You can access the static methods and variables in any where through the programme. you can not access non static variables and method from the static context. can you please explain your question a bit elaborately.
Originally posted by Gitesh R: In case of constructors we can access static variables and/or methods though using them only as part of the call to super() or both(). But we cannot access member variables/methods from constructors.
Static members can be accessed from anywhere in the class, be it outside or inside a super/this.
I don't understand your explanation. Can you elaborate more, please? To me, both statements contradict each other.
I also tried this code sample, where I try to access a static method and a static variable: