Can u overload main()method.Give with example.
Answer Posted / srinu
yes we can overloaded the main() method
public class A
{
public static void main(int a[])
{
System.out.println("overloaded method");
}
public static void main(String a[])
{
System.out.println("main method");
}
output: overloaded method
Is This Answer Correct ? | 26 Yes | 89 No |
Post New Answer View All Answers
describe method overloading
What are the ways in which a thread can enter the waiting state?
What is meant by JVM? Is JVM platform independent or not?
How can we create a synchronized collection from given collection?
Why does java not support operator overloading?
Should a main method be compulsorily declared in all java classes?
What does the string method compareto () do?
What is constructor in java ?
When do you get classcastexception?
How to sort an unsorted array in java?
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?
Is java still relevant?
What is finalize()?
Explain importance of finally block in java?
What do you know about the garbate collector?