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

Differences between traditional programming language and object oriented programming language?

1179


What is a nested list?

1020


Explain java coding standards for variables ?

1222


What is the access scope of protected access specifier?

1040


What is the final class?

1126


What is the numeric promotion?

1092


Is space a character in java?

1065


Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

1162


What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?

1181


Explain about join() method?

1023


What is an escape character in java?

1098


Why a dead thread occurs?

1023


Is string thread safe in java?

1141


How to declare an arraylist in java?

1192


a thread is runnable, how does that work? : Java thread

1089