i made a class User with properties in user.java file and want to access that class in other activity. i made the object of that class in main activity but its not working
public class User{
public static int id;
public static String name;
public static String desg;
public int getId() {
return id;
}
public void setId(int id) {
User.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
User.name = name;
}
public String getDesg() {
return desg;
}
public void setDesg(String desg) {
User.desg = desg;
}
}
public class MainActivity extends Activity {
User user = new User();
EditText name = (EditText)findViewById(R.id.name);
EditText desg= (EditText)findViewById(R.id.desg);
EditText id = (EditText)findViewById(R.id.id);
ArrayList<user> userlist = new ArrayList<user>();
Button btn;