I have this coding inside my java file . This code basically receives an int value and sets a char value for an Object
Student st = new Student();
if (attributeName.equals("Grade")) {
    int sidevalue = Integer.parseInt(attribute.getValue());  // This returns an int value , and this value needs to be converted into char later as shown 
    if(sidevalue==1)
        st.grade=1;
    else if(sidevalue==2)
        st.grade=2;
    else if(sidevalue==5)
        st.grade=3;
}
class Student
{
    char grade ;
}
 
     
     
     
     
     
     
     
     
    