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 is the effect of keeping a constructor private?

877


Define inheritance with reference to java.

1029


What is merge sort in java?

917


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

2763


What is number data type?

971


Which category the java thread do fall in?

946


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

985


What does the “final” keyword mean in front of a variable? A method? A class?

944


When should the method invokelater() be used?

976


Why does it take so much time to access an applet having swing components the first time?

1875


What is numeric data type?

929


What happens if main method is not static?

950


What is re-factoring in software?

981


What is the difference between @before and @beforeclass annotation?

1016


Is integer immutable in java?

927