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 / kedar

static methods can be accessed without creating object object of class, we know that file name of java program is "classname.java", "classname" is the class which contain main function, so it is easier for compiler to locate class which contain main(), and because of static nature it can execute it.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java beans?

999


What must a class do to implement an interface in java programming?

1059


23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

2473


Difference between nested and inner classes ?

1133


what is meant by Byte code concept in Java?

1070


Give few difference between constructor and method?

965


What is treeset in java?

1003


What is a container in a gui?

994


Is null a string or object in java?

970


What is Garbage Collection in Java

1084


Can we declare a static variable inside a method?

1001


Is java free for businesses?

1071


How many types of memory areas are allocated by JVM in java?

1072


How are variables stored?

986


What is boolean false?

984