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

Is final static java?

0 Answers  


Why is core java important?

0 Answers  


Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why not with interface? Thanks in advance.

2 Answers  


Name the package that always imported by default?

4 Answers  


What is string syntax?

0 Answers  


What is the difference between interface & abstract class?

0 Answers  


Why scanner is used in java?

0 Answers  


Differece between class and generic class?

0 Answers   Tech Mahindra,


Why do we need hashset in java?

0 Answers  


What are the data types supported by java? What is autoboxing and unboxing?

0 Answers  


How many functional interfaces does java 8 have?

0 Answers  


What's the difference between comparison done by equals method and == operator?

0 Answers  


Categories