• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in understanding the concept of static method  RSS feed

 
Shiv Tattva
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that static method cannot use non-static methods .
Then how the following code works ,where main method is static and this main method calls go() method which is a non-static method .


Thanks
 
fred rosenberger
lowercase baba
Bartender
Posts: 12562
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
because you have created a SimpleGuib object, and you are calling the method go() on that object.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!