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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How are observer and observable used in java programming?

1029


How can we break singleton in java?

968


List two java ide’s?

1046


What is the difference between declaration and definition in java?

1075


Is null function in java?

1042


What is the purpose of final keyword and when to use it?

1004


What is meant by oops concept in java?

997


What is data type in computer?

961


What is skeleton and stub? What is the purpose of those?

1129


What happens when I use / and % with a negative numerator?

1043


What is super in java?

997


How do you break a loop?

985


What are methods?

1025


Can we serialize arraylist in java?

1009


What is the difference between a field variable and a local variable?

1112