Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

main method

807600Nov 13 2007 — edited May 23 2008
Can we access the methods of a class without instantiating it?

When we create a class like this->
class A{

public static void main(String args[]){

// code goes here....

}
}
We dont creat instance of A. But still main is the first method to be called. Then how is main method called?? Who or what calls the main method??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2008
Added on Nov 13 2007
35 comments
674 views