Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In Java why we write public static void main(String args[])
why not main()?

Answer Posted / abhi

it is bcoz...
since MAIN is also a method and it is not called by creating instance it is declared STATIC so that it is invoked by the JVM without creating instance.....

PUBLIC because it is called by the jvm which is not is not a part of the class directly.....

VOID because it does not return any value.....

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When parseint method can be used?

955


Why is serialization required?

963


What are the fileinputstream and fileoutputstream?

1068


What is the symbol for average?

1030


What is the difference between static binding and dynamic binding?

1130


is there a separate stack for each thread in java? : Java thread

980


Is java developer a good career?

1028


Why does it take so much time to access an applet having swing components the first time?

1928


Is alive and join method in java?

1178


When should I use singleton pattern?

1033


What are advantages of using Java?s layout managers than windowing systems?

2371


What is literal example?

952


what is the major difference between linkedlist and arraylist in java?

1221


What are the important features of Java 11 release?

1118


What is the major advantage of external iteration over internal iteration?

1111