aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes static method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "static method" Watch "static method" New topic
Author

static method

srinivas sridaragaddi
Ranch Hand

Joined: Jul 24, 2007
Posts: 225
Hi,



doubt: how come static method main is able to access a non static method infiniteLoop()


SCJP 5.0<br /> <br />"Skills are started with learning and mastered with improvement. Nothing is hereditary except death" BUDDHA...
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Because you use the instance to call the infiniteLoop(). If you call it directly without using the instance, it won't compile.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static method