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 u overload main()method.Give with example.

Answer Posted / aditya sharma

* Yes we can overload the main method.

File Name :- checkOverloadingMainMethod.java
Example: -

public class checkOverloadingMainMethod {

public static void main(int a[]) {
System.out.println("Overload =>Integer Array");
}

public static void main(String args[]) {
System.out.println("Overload => String Array");
}
}

Is This Answer Correct ?    120 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1617


What is the difference between the final method and abstract method?

1054


What is ternary operator?

1010


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

990


What is struts in java?

1041


What is the difference between the paint() and repaint() methods in java programming?

1187


What do you mean by thread safe?

981


Which is better ascii or unicode?

996


What is meant by object?

1007


What are different exception types exceptions available in java ?

1007


What is an eror in java?

1054


What are the drawbacks of singleton class?

1009


Why do we use return statement?

1042


Explain about exception propagation?

1035


What are the differences between stringbuffer and stringbuilder?

1061