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 / kanchan bangar

In java if we are not writting public static void main
(String args[]) then program is only compield not run
that's why it must write because compiler in java always
look the main function and when compiler always calls the
main class is loaded in frist time call for that static
keyword is used and public is for access everything means
methods and member variabls of any pakage and classes or in
super class and meand it does not return any value.

Is This Answer Correct ?    18 Yes 57 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

1108


What is the nested interface?

1108


What is meant by anonymous class?

1025


Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example

2601


What is the difference between double and float variables in java?

1153


Is alive method in java?

980


What does math floor () do?

965


Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

1055


Explain about main() method in java ?

1069


What is finalize()? Is finalize() similar to a destructor?

965


Difference between notify() method and notifyall() method in java?

970


What is the do while loop syntax?

1036


What is the size of arraylist in java?

1028


Can a class have 2 constructors?

896


What is google full form?

1014