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 constructor has no return type?

1052


EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.

9141


What is sleep method?

1034


What is stored procedure. How do you create stored procedure ?

1889


What is use of set in java?

922


Can we extend private class in java?

924


Can we create a constructor in abstract class?

935


What was java originally called?

902


List down the methods and interfaces of collection class in java.

932


What is the range of a character variable?

930


Outline the major features of java.

1031


What is anagram in java?

862


What happens if we override private method?

913


What are the pillars of java?

861


Explain all java features with real time examples

1656