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

What is a java proxy?

971


What is an action class in java?

1026


What is the difference between a jdk and a jvm?

912


What is the use of lambda functions?

933


What is @resource annotation in java?

912


What is dao in java?

973


What is war file in java?

978


What is meant by annotation in java?

984


What is meant by pass by reference and pass by value in java?

921


What is mime in java?

913


How can I write a program that takes command line input?

884


Can an application have multiple classes having main method?

936


What is aop java?

916


What is @override annotation in java?

984


Explain issues of old java date api?

1005