So I have a class with an int attribute which can't be static:
public class GetterId{ int id = 42; public int getId() { return id; } public void setId(int id) { this.id = id; } } And I'd like to have an access to this "id" attribute from another class, like:
public class MainActivity { int id_bis; id_bis = GetterID.getId(); } But it can't be this way because the method getId() and the attribute from the GetterId class are non static...
Is there any solutions to this problem?