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...

Need to use public,static keywords in main function?

Answer Posted / suresh

Main method is called by jvm...
jvm is out side the class
so main method must be pulic
then only jvm can access.

No instance of the class is needed to
execute the static method.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference in between cpp and java? Can u explain in detail?

1083


Why enumeration is faster than iterator?

925


How do you format in java?

995


What is OOP Language?

1067


What are constructors in java?

1096


What is main difference between variable and constant?

1024


How you can force the garbage collection?

981


How to create a base64 decoder in java8?

1050


Is int primitive data type?

937


What is immutable class in java?

932


What is the difference between a choice and a list?

1075


Can we have any other return type than void for main method?

949


What exactly is a .class file?

1041


Define jit compiler?

1128


Does java allow default arguments?

987