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

Java Compiler is stored in JDK, JRE or JVM?

1486


What is a void in java?

1092


What are methods in java?

955


Difference between concurrent hashmap and hashtable and collections

1015


How many types of threads are there in java?

1011


What is core java called?

939


Can a private method be declared as static?

981


Explain the different forms of polymorphism?

962


When should you use arraylist and when should you use linkedlist?

891


Does .length start 0 java?

974


What do you mean by pointer value and address?

1015


What is tostring () method?

966


Explain about the dynamic behavior of core java?

1080


What is keyword and identifier?

1091


How to reverse a string in java?

1028