• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling non-static method from a static method  RSS feed

 
shivang sarawagi
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way of calling a non static method from a static method ??
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, ofcourse. You just have to call the non-static method on an object. To understand what the difference between static and non-static methods is, read: Understanding Instance and Class Members

 
shivang sarawagi
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jesper
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!