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

Can a class have multiple subclasses?

0 Answers  


What do you understand by garbage collection in Java? Can it be forced to run?

0 Answers   TCS,


What class of exceptions are generated by the java run-time system?

0 Answers  


Why is java not 100% pure oops?

0 Answers  


What is the difference between a loader and a compiler?

0 Answers   Syntel, Visa,


What is ascii code?

0 Answers  


What is JDK? Mention the variants of JDK?

1 Answers  


What is the difference between Java1.4 and Java1.5

0 Answers   NIIT,


How are this() and super() used with constructors?

9 Answers  


Explain the selection sort algorithm?

0 Answers   Hexaware,


How to know the host from which Applet is originated?

1 Answers   Wipro,


How many digits is int32?

0 Answers  


Categories