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
when to use ArrayList and when to use HashMap in webApplication.
What is a method in programming?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green White will have 1 Weight. Red and Green carry no weights. Shortest path is the path with less weight when you add up the weights in the path.
What is ctrl m character?
Why are generics used?
What is difference between == equals () and compareto () method?
What is port number in java?
What is static keyword in java?
How do you add an arraylist to an array in java?
How does arrays sort work in java?
what is synchronization? : Java thread
Mention some interfaces implemented by linked list in java.
What is the driver class?
What is character in data type?