public class mystudent{
private static String stuName;
private static int stuAge;
private static String stuSex;
public static void setVar(String name,int age,String sex){
stuName =name;
stuAge =age;
stuSex =sex;
}
public static void updateVar(String sex){
static stuSex =sex;
}
public static String getName(){
return stuName;
}
public int getAge(){
return stuAge;
}
public static String getSex(){
return stuSex;
}
public static void main(String args[]){
setVar("Mike",21,"male");
updateVar("female");
String outVar =getSex();
System.out.println(outVar);
}
}