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 is the point of java?

1024


How to split arraylist elements in java?

1177


Is heap stored in ram?

964


Which sorting algorithm is in place?

972


How the metacharacters are different from the ordinary characters?

1021


Explain what pure virtual function is?

1025


How do singleton patterns work?

972


What is the difference between static class and normal class?

1032


What is difference between path and classpath in java?

1027


What is time complexity algorithm?

1051


What is a variable and constant?

1004


What are thread local variables?

1152


Why array is used in java?

972


What is the relationship between class and object?

1046


What is the tradeoff between using an unordered array versus an ordered array?

1241