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

Why is core java important?

1028


Can we declare register variable as global?

922


How to create com object in Java?

1061


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

1052


Which is fastest collection in java?

1068


Does java isempty check for null?

993


What is a superclass?

1336


what do you mean by marker interface in java?

972


Is java a pure object oriented language?

958


What are class types in java?

1061


What is the difference between method overriding and overloading?

1224


What are the different types of inheritance in java?

980


What is difference between path and classpath?

1150


Can static methods access instance variables in java?

1072


Which list is sorted in java?

1022