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 / rameshreddy.k

As we know public means we can access the method from
anywhere. in a java we want call method by using class
object. But main() is also method .that main() is there one
class but jVM execute program trough main() method with out
creating object main() method call thats way we use public
static the main function
thanks& regargs
RAMESH

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are generic methods?

920


What is a java developer salary?

924


What happens if constructor is private?

978


What is equlas() and hashcode() contract in java? Where does it used?

1067


Why unicode is important?

900


How do you reverse a word in java?

1005


how to deploy tomcatserver to weblogic server? write d following steps?

1918


What do you mean by access modifier?

974


What carriage return means?

920


What does it mean to flush a file?

1015


What is the difference between Grid and Gridbaglayout?

1158


Describe 2 different ways to concatenate two strings.

1148


how to split string in java?

1154


What is the purpose of interface?

958


What is private static in java?

1005