I am really confused about the keyword "this" and without "this" on classes, because i think it is the same :
public class thisthing {
public int a;
public arrays(){
a=1;
}
public void A(){
this.a=10;
}
public void printa(){
System.out.println(a);
System.out.println(this.a);
}
}
if I call printa
without calling A()
I get this results :
1
1
but if i do the same with calling A()
:
10
10
What is the difference between these two?