• Post Reply Bookmark Topic Watch Topic
  • New Topic

Void and Static  RSS feed

 
Ranch Hand
Posts: 49
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does void and static mean in the main method?

THANKS for the help!
 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, void and static have same meaning applied to any method. It is not specific to main method.

It(static) means that the method is a class-method - and can be called(directly/indirectly) without creating object. It(void) also means that the method does not return any value.

I hope this helps.
 
Marshal
Posts: 4051
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle's Classes and Objects Tutorial will explain it much better than I could in a forum post.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:Oracle's Classes and Objects Tutorial will explain it much better than I could in a forum post.

I agree.

Franklin, if your doubt is in general about what void and static is, then you should go through the link mentioned by Tim.
 
Franklin Marquette
Ranch Hand
Posts: 49
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay - THANKS for the help!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!