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


Why do we need public static void main(String args[])
method in Java...?



Why do we need public static void main(String args[]) method in Java...?..

Answer / shadow

We need
• public: The method can be accessed outside the
class / package
• static: You need not have an instance of the class
to access the method
• void: Your application need not return a value, as
the JVM launcher would return the value when it exits
• main(): This is the entry point for the application
If the main() was not static, you would require an instance
of the class in order to execute the method.
....!

$HADOW

Is This Answer Correct ?    14 Yes 0 No

Post New Answer

More Core Java Interview Questions

How do you compare arrays in java?

0 Answers  


What is float in java?

0 Answers  


What is difference between variable declaration and definition?

0 Answers  


What is an Applet ?

2 Answers  


What happens when heap memory is full?

0 Answers  


What is a parameter example?

0 Answers  


What is outofmemoryerror in java?

0 Answers   Cyient,


justify c is portable

1 Answers  


Which Math method is used to calculate the absolute value of a number?

3 Answers   Accenture,


what is the use of custom tags? with example?

1 Answers   Photon,


What is numeric data type?

0 Answers  


How many types of thread in java? give the name

13 Answers   Cisco, NIIT,


Categories