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 / sai kiran varma

In java main() is a default calling funtion.
first main() function is called.
As we dont no what value it returns we use void keyword for it.
only static methods can be called using class names so we
declare static.
only public methods can be accessed from any where so,we use
public..

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different approaches to implement a function to generate a random number?

1101


What is a dynamic array in java?

1243


What is bom encoding?

1047


What is the difference between hashmap and hashtable in java?

1170


How do you write a scanner class in java?

1061


What are multiple inheritances? Is it supported by java?

1000


Can we instantiate interface in java?

1185


What is the tradeoff between using an unordered array versus an ordered array?

1286


Is null or empty java?

1029


Can an object be null?

1008


How do you check if an arraylist is not empty?

1184


What are the major drawbacks of external iteration?

1101


What are the actions that can occur when a thread enters blocked state?

1110


What is a variable declaration?

1031


What is jrmp?

1004