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

What are the advantages and disadvantages of reference counting in garbage collection?

978


What is a stack class in java ?

1059


Is a case study a method or methodology?

854


Can a class have a static inner class?

1032


What is java and their uses?

977


Can a java program have 2 main methods?

1005


What are the differences between heap and stack memory in java?

1007


what are the high-level thread states? : Java thread

961


Is void a keyword in java?

970


What is a super method?

933


Is a class an object?

953


What is the use of arraylist class in java?

1021


How many bytes is double?

926


What is function declaration?

922


How to declare objects of a class ?

1025