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 / ankit

public is written so that it can be called from outside and
static is written because main is called before the creation
of any object and for static methods object is not required.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stringbuffer in java?

1067


Is zero a positive integer?

1070


Is void a wrapper class?

952


What state does a thread enter when it terminates its processing in java programming?

1050


What are the main differences between the java platform and other platforms?

1062


How to display arraylist values in java?

1014


What is the difference between abstraction and encapsulation?

1051


What is double parsedouble in java?

1054


What is the purpose of default constructor?

1002


What does s mean in regex?

1019


What are the advantages of user defined functions?

1008


How do constructors use this() and super()?

1123


What is the main function in java?

1072


What is bean? Where it can be used?

1088


Why is singleton class used?

1039