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

In Java why we write public static void main(String args[])
why not main()?

Answer Posted / srinivas_cena

public- public isa access specifier,so we can use the method from out the class
static- static is a keyword which is used to calla methos with out creation of object for a class. so jvm directly runs from main() method.
void- main() method does not return any value so it has void data type.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is vector?

1068


In java, how many ways you can take input from the console?

1000


What is difference between float and double?

965


What is a singleton factory?

956


Is null an object java?

997


How many types of variables are there?

1132


Can you call a method in a method?

1096


What do you know about the garbate collector?

1023


In which language java is written?

984


What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

1134


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

1106


What is the method overriding?

1082


How many times finalize method will be invoked? Who invokes finalize() method in java?

1020


What is consumer in java?

979


Is java developer a good career?

1028