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 between a constructor and a method?

1258


What is time complexity java?

997


What is assembly condition codes?

993


Why is java so popular?

1123


Which method returns the length of a string?

1041


Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.

1037


How to do encapsulation in java?

1054


What is private protected in java?

1056


What is use of arraylist in java?

1182


Where is java located?

1055


What is multiple inheritance? Is it supported by java?

968


How do you detect memory leaks?

1059


Which is the best approach for creating thread ?

1216


What is set string?

1191


What is data and its types?

1006