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

public static void main(String args[]) the meaning is

public:- Actually the main()method will be called by JVM .so
JVM is located other place so JVM will called by our main()
its public

static: with our object creation run our main()method so
thats its static

void:our main() method can't any return type thats its void

String args[]:. To get command_line arguments

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What an i/o filter?

1011


What is callablestatement? How you can call stored procedure to pass in parameter?

1023


Difference between arraylist and vector.

1116


What is string in java? String is a data type?

1014


What is the set interface in java programming?

1200


What is OOP Language?

1067


Is java call by value?

1082


What is a conditional statement explain with example?

1010


What is a static class in java?

1001


What is definition and declaration?

1007


What is the purpose of the finalize() method?

1244


Can we have multiple classes in single file ?

1064


What are the benefits of java?

1128


Is break statement can be used as labels in java?

958


What does || mean in vectors?

929