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 / balaji kumar

public - it can be access outside of the(class, package,
subclass and world).

Static- It is used to run a method without any references of
a class. Then JVM will check all the 'static' methods in
"main class" and run the main method from those.

void- main method always has no return value to outside
methods or others. so it uses void keyword.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is early binding and late binding in java?

1114


Which class is the superclass of all classes?

1070


What is ++ a in java?

931


What is derived datatype?

1159


Why is it called boolean?

951


Can java cast null?

988


Can we declare register variable as global?

902


Can we create our own wrapper class in java?

926


What is internal iteration in java se 8?

1141


What restrictions are placed on method overloading?

1132


What are the different types of constructor?

937


Is java a super set of javascript?

1056


What is string variable?

998


What are desktop procedures?

1013


Explain about varargs in java?

1069