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

Write a program to reverse a number in java?

1051


What is Java Reflection API? Why it’s so important to have?

1086


What is the maximum size of a string in java?

1012


What are the files generated after using IDL to java compiler?

1098


Differentiate between stringbuffer and stringbuilder in java.

984


What are the features in java?

1026


What are class members by default?

1031


Give some features of interface?

1024


What is a protected class in java?

949


What is command line used for?

1057


Is array a class?

889


What is class forname used for?

1009


What is a parameter in a function?

958


Can java hashmap have duplicate keys?

970


In java, how many ways you can take input from the console?

942