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

if we don't use public in main method jvm is looked for main
method but does not found.so run time error will occurred
"main() method must be declared as public". why its static
means in java we can execute methods with object.if we use
static it will execute without object.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a constructor and a method?

1155


What is class and its types?

972


What is the largest long allowed by java?

1003


Who found java?

937


Where is const variable stored?

886


How to check if a list is sorted in java?

971


What is the difference between equals() and?

1114


What happens when a thread cannot acquire a lock on an object in java programming?

947


What is the use of pattern in java?

986


How many bytes is string in java?

1146


Why does java doesnt suuport unsigned values?

2173


What is the meaning of variable in research?

951


What is the original name of java?

1005


What is the difference between applet and application?

947


What is boolean example?

890