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

In Java why we write public static void main(String args[])
why not main()?

Answer Posted / srinu

public static void main(String args[]) the meaning is

public:- Actually the main()method will be called by JVM .so
JVM is located other place so JVM will called by our main()
its public

static: with our object creation run our main()method so
thats its static

void:our main() method can't any return type thats its void

String args[]:. To get command_line arguments

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which methods cannot be overridden in java?

1001


What are the five major types of reference sources?

1133


What is the maximum length of a url?

970


Highest level event class of the event-delegation model?

4015


What are examples of modifiers?

1130


what is optional in java 8?

1065


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

1069


How are java objects passed to a method and what are native methods?

1083


Difference between static synchronization vs. Instance synchronization?

1129


how can i use a nonsynchronized hashtable?

2571


How do you do exponents in java?

1063


What is object-oriented programming?

1129


How to calculate the length of a singly linked list in java?

1039


What is prefix of a string?

1041


What is the use of callablestatement?

1022