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

Why do we use public static with the main function in Java?

Answer Posted / rameshreddy.k

As we know public means we can access the method from
anywhere. in a java we want call method by using class
object. But main() is also method .that main() is there one
class but jVM execute program trough main() method with out
creating object main() method call thats way we use public
static the main function
thanks& regargs
RAMESH

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of default constructor?

956


Is empty .java file name a valid source file name?

1058


What is heterogeneous in java?

899


Can arraylist hold different types java?

920


What does singleton mean in java?

943


Can a main method be declared final?

999


What is data type example?

897


What are serialization and deserialization?

1192


What is a generic data type?

957


I want to store more than 10 objects in a remote server? Which methodology will follow?

3122


What java is used for?

1024


I want to re-reach and use an object once it has been garbage collected. How it's possible?

952


Why java applets are more useful for intranets as compared to internet?

1010


What is used of static keyword in java?

999


What is the this keyword?

976