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 stack class in java?
What is meant by class?
What do you mean by data type?
Why does java have two ways to create child threads? Which way is better?
What are the approaches that you will follow for making a program very efficient?
Explain OOPs concept.
How to sort an unsorted array in java?
What are java annotations?
List the three steps for creating an object for a class?
Describe string intern() methodology
What is floor math?
Is java code slower than native code?
Why string is immutable with example?
What are the types of web technologies?
Can size_t be negative?