Page 1 of 1

About Question enthuware.ocajp.i.v7.2.957 :

Posted: Wed Feb 25, 2015 9:16 pm
by dmcinnis1
Why are someInt and changeIt accessed directly by main instead of TestClass.someInt and TestClass.changeIt. Is it because main is in the TestClass class? Because it is a static method ans static methods can directly access static variables and static methods?

Re: About Question enthuware.ocajp.i.v7.2.957 :

Posted: Thu Feb 26, 2015 12:20 am
by admin
Yes, static as well as instance methods of the same class can access other static methods and static variables without the need for writing the classname. Instance methods can access instance fields as well without any qualifier.

Re: About Question enthuware.ocajp.i.v7.2.957 :

Posted: Tue Nov 03, 2015 7:58 am
by Mushfiq Mammadov
"an" is written twice
Image

Re: About Question enthuware.ocajp.i.v7.2.957 :

Posted: Tue Nov 03, 2015 8:39 am
by admin
Fixed.
thank you for your feedback!