aspose file tools*
The moose likes Java in General and the fly likes significance of  public, static, void and main Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "significance of  public, static, void and main" Watch "significance of  public, static, void and main" New topic
Author

significance of public, static, void and main

Yasser Shaikh
Greenhorn

Joined: Oct 01, 2008
Posts: 21
what is the significance of

public, static, void and main in


~~yr[:_:]s~~
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3370
    
    9
Do you have any guesses? If you don't, start reading this: http://download.oracle.com/javase/tutorial/java/index.html
Yasser Shaikh
Greenhorn

Joined: Oct 01, 2008
Posts: 21
Stephan van Hulst wrote:Do you have any guesses? If you don't, start reading this: http://download.oracle.com/javase/tutorial/java/index.html


couldnt find the answer there ... please help i am a beginner!
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13870
    
  10

Yasser, did you really look in the tutorials that Stephan pointed you to? Because you can easily find the answers in there. Here are some more specific links into the relevant tutorial pages:

public: Controlling Access to Members of a Class
static: Understanding Instance and Class Members
void: Returning a Value from a Method
main: A Closer Look at the "Hello World!" Application

If there's still something you don't understand, then please ask more questions here - but please be specific. It's hard to understand a generic "I don't understand it" question.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Yasser Shaikh
Greenhorn

Joined: Oct 01, 2008
Posts: 21
Jesper de Jong wrote:Yasser, did you really look in the tutorials that Stephan pointed you to? Because you can easily find the answers in there. Here are some more specific links into the relevant tutorial pages:

public: Controlling Access to Members of a Class
static: Understanding Instance and Class Members
void: Returning a Value from a Method
main: A Closer Look at the "Hello World!" Application

If there's still something you don't understand, then please ask more questions here - but please be specific. It's hard to understand a generic "I don't understand it" question.

ok I understood all of it now. thank you. now I want to ask is the String var[] in the main method is it compulsary??
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Yasser Shaikh wrote:is the String var[] in the main method is it compulsary?

What happens if you leave it out? Can you compile it? Can you run it?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
By the way, it is the usual custom to writeIt is better style for the [] to follow "String", not "args".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: significance of public, static, void and main
 
Similar Threads
Please I need Help on this ASAP
Basic Q
a question in Chapter One of RHE's book
Java
top lavel static clas