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 use public static with the main function in Java?

Answer Posted / ravikiran(aptech mumbai)

public means we are allowing the main method to be accessed
any where in the application.and is declared static because
jvm will look for the static one's once it completes the
loading the class.

Is This Answer Correct ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about member inner classes?

1040


Does a function need a return?

923


How many types of the indexof method are there for strings?

933


What is oop principle in java?

1066


What is comparable and comparator interface? List their differences

1043


What is api in java?

943


What happens when main () method is declared as private?

1097


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

1198


how to create daemon thread in java?

1017


What is set and get methods in java?

936


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

2550


What programs use java?

889


What is the difference between super class & sub class?

1102


Can you declare the main method as final?

970


What is the difference between variable declaration and variable initialization?

989