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
What is meant by tab pans?
Why are the methods of the math class static?
What are checked exceptions?
What is externalizable interface?
What is return type in java?
Which is better ascii or unicode?
What is nan in java?
How many bytes is a url?
What is a predicate method?
What is called module?
What are mutable classes?
Which is better stringbuffer or stringbuilder?
Which is faster set or list in java?
Give example to differentiate between call by value and call by reference.
What is procedure writing?