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...

can we overload main method?

Answer Posted / srinivaskumar.nimmana

Yes, we can... like this,

public static void main(String[] args){....}
pulbic void main(int a){....}
public static int main(flaot f){....}
public String main(string s){....}

in the above code public static void main(string[] args) executed as thread remaining methods are normal methods in our java class. in jvm p.s.v.main(string[] args) defined with thread so jvm always search for this syntax only.any other main() with diffrent parameters are consider as normal method

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between character constant and string constant in java ?

959


Why for each loop is used?

959


List the interfaces which extends collection interface?

890


What do you understand by overloading and overriding in java?

1011


Explain the difference between call by refrence and call by value?

971


Which class is used by server applications to obtain a port and listen for client requests?

905


explain copyonwritearraylist and when do we use copyonwritearraylist?

897


Explain about doubly linked list

971


Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain

1861


What are the advantages and disadvantages of object cloning?

1039


Can we write any code after throw statement?

1004


How is java created?

884


How we can execute any code even before main method?

1074


What is unicode used for?

1082


What is binary tree in java?

1000