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

1. public - Access Specifier, properties and methods can
access anywhere, any package.

2. main() - The Java environment starts the execution of a
program from main() method.

3. void - The main() method is not return anything. So the
return type of the main() method must be void.

4. static - The jave environment able to call the main()
method without creating an instance of the class. So its
declared as static

5...(String args[]) -- In java, whatever we give, it will
takes as String. So we are giving the command line argumet
as String.


i hope it will help u..

Shivadasan
Coromandel Infotech

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

932


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

957


What is split return?

926


What is the difference between super class & sub class?

1079


What are the parts of a method?

931


What is blank final variable?

1012


what is abstract class in Java?

1070


How can you set an applet’s height and width as a percentage?

875


What is a map? What are the implementations of map?

1039


What is an image buffer?

924


What are triggers in DB? Explain their types. How do they work?

1034


What is the synchronized method modifier?

1133


How destructors are defined in java?

1121


when you will synchronize a piece of your code? : Java thread

961


Why are the objects immutable in java?

936