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 null in java?

959


What is the purpose of an interface?

1037


Why do we need array in java?

1006


Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?

1139


What do you mean by default constructor in java?

1061


what are different ways in which a thread can enter the waiting state? : Java thread

961


Is java a prime method?

981


Why pass by reference is not possible in java?

1031


can java object be locked down for exclusive use by a given thread? : Java thread

1089


What is an example of a constant variable?

1076


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

1010


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

1027


What is the purpose of encapsulation?

1007


Why arraylist is not synchronized in java example?

1056


What’s a deadlock?

1097