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 purpose of writting public static void main(Strind
arg[]) in java..?

Answer Posted / jyotshna pardhia

public: to call by jvm from anywhere.(i.e. suppose ur
programms are saved in d drive and jdk is installed in e
drive so we can call by jvm from any drive )
static: without creating objects also jvm has to call this
method.
void: main() method never returns anything to jvm.
main: name of this method which is configured as main
only,inside the jvm by sun.
String []args: command line arguments.

if we are performing any changes to this main method than
we will get run time exception but still we can add
identifiers like strictfp and synchronized to main method.

Thanks & Regards
jyotshna

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the approaches that you will follow for making a program very efficient?

1128


What is the difference between static class and normal class?

1086


What is a short in java?

1121


What is an object's lock and which object's have locks in java programming?

1108


What is compareto?

1105


Can we override final method?

1068


Is string a datatype?

1037


Is java jre still free?

1005


Explain the concept of proper inheritance?

1108


Can a static class implement an interface?

1190


What is the difference between jvm and jre? What is an interface?

1152


Explain an algorithm to find depth of a binary tree.

1103


What is quick sort in java?

1071


What is public static?

1089


What do you mean by Hash Map and Hash Table?

1144