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 / deepak divvela

In the main function generally we are using
public static void main(String args[])
that means public is used for call method without being the
member of the class.
and static is used for to call method directly with no need
of the object creation.

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How arrays are stored in memory in java?

968


What is a class reference?

1086


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

1044


What is the difference between replace and replace all?

1008


Is singleton a bad practice?

1035


Is java map thread safe?

947


What causes memory leaks in java?

921


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

1074


What is sorting in java?

980


What are inner classes or non static nested classes in java?

1168


What is an abstract class and what is it’s purpose?

953


Can we override tostring method in java?

966


What are the advantages and disadvantages of object cloning?

1100


Explain the reason behind ending a program with a system.exit(0)?

1072


What environment variables are required to be set on a machine in order to run Java programs?

1183