i have a problem : i have 2 classes let's say a.class and b.class . I'm using in a.class some "private" variables, let's say "private int ind1 = 0;" , also i have created interface methods in a.class to work with ind1 variable in b.class : (interface methods:) to insert variable "public void iind1(int i ) { ind1 = i; }", to get variable "public int gind1() { return ind1; }" . In b.class i have created an object of a.class "a s = new a()" . When i try to see in b.class if variables is there where it should be, i mean i use "System.out.println("s.gind1()");" - ok i get the variable with some number... , but when i try to calculate in a.class with variable ind1, and when i write in a.class "System.out.println("ind1");" i get that "ind1 = 0:" , but earlier when i wrote s.gind1() in b.class the variable wasn't = 0 . What do i do Wrong please help me to find out. i think something is bad with Object "s" or so, which i create... i mean in b.class information is, but when i use ind1 variable in a.class , all the meaning of that variable is being gone .