This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
r suraaj wrote:yes., i tried.,
other than main() method other static methods doesn't have the access to instance variables and non-static methods.
Main method is not behaving differently from other static methods, it's just the starting point where JVM looks for when running a class. Neither of them have access to the instance fields etc.., but as you said earlier by creating an instance it's possible to access that instance's fields either in normal static method or in main() method.