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 instanceof operator used in java?

1038


What is static variable with example?

1016


What are adapter classes?

1052


What is string pool in java?

1027


Explain access modifiers in java.

1046


Which object oriented concept is achieved by using overloading and overriding?

1117


What does jre stand for?

1063


Explain the difference between abstract class and interface in java?

990


I want to store more than 10 objects in a remote server? Which methodology will follow?

3206


What is ph and buffers?

1006


What are the files generated after using IDL to java compiler?

1150


How many types of design patterns are there?

1103


What is your platform?s default character encoding and how to know this?

2372


does java support pointers?

998


What is string substring?

1178