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...

What is the need to declare main() method as static in Java?

Answer Posted / paletipatisrinu

public static void main(String k[]) here

public:The main method will be called by jvm.so jvm is
located some other place so invoke our main() should be public

static:before object is creation calling main() method so
the main() method will be called by using static

void:so jvm does not expected any return value
main():its method name
String[]:argument type is String

Is This Answer Correct ?    17 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is jar an executable?

823


In java thread programming, which method is a must implementation for all threads?

949


What are jpa annotations?

864


What is dependency injection in java?

845


Describe the principles of oops.

855


How do you count in java?

875


What is java api?

849


What is use of jpa?

817


Which class is the superclass of every class?

950


What is dialect in java?

851


In hibernate what is the difference between the Session and SessionFactory?

891


Which is more secure: java or activex? : java security

894


What is difference between loosely coupled and tightly coupled in java?

813


What is reflection in java?

894


What is custom tag in java?

863