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 java main method is given as static method?

Answer Posted / saravanan.v

Java is a object oriented language.So even main method also should be written inside a class name main class.So main method should be called WITHOUT CREATING OBJECT for main class.For this purpose, it is declared as static.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use protected in java?

1022


What is class level lock ?

1077


What is final, finally, finalize?

1186


What are the new features in java 8? Explain

997


What is an eror in java?

1105


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

1166


What is meant by class?

1058


How does map works in java?

1047


What are the advantages of inner classes?

1066


Which is faster set or list in java?

1075


Is static variable stored in heap?

1049


Why declare Main() inside the class in java ?

1114


What do you mean by exception handling in Java?

1364


What is the base class for error and exception?

1036


What are inner classes or non static nested classes in java?

1214