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 / shekhar chauhan

public static void main()- firstly, public which r used
globly access this method in our whole progam. and static
basically used for that we can used only one main method in
whole program.we can not create object that class. so we
make static main method.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about exception propagation?

971


What is a protected class in java?

936


What is class and object in java?

943


What do you know about the garbate collector?

975


Can a vector contain heterogenous objects?

1003


explain multi-threading in java?

958


What is singleton service?

905


Can you have two constructors in java?

897


What is a final class ?

1077


What are the types of casting?

1006


If we don’t want some of the fields not to serialize how to do that?

955


Why can't you declare a class as protected?

1045


What are the different conditional statements?

932


What are recursive functions? Give some examples?

1116


what is a green thread? : Java thread

952