Can u overload main()method.Give with example.
Answer Posted / manikandan [ gtec,vellore ].
yes,gothrough below code.
class test
{
public static void main(String []asdff)
{
test.a();
}
public static void main(int a,int b)
{
System.out.println("over loaded");
}
static void a()
{
test.main(1,2);
}
}
Is This Answer Correct ? | 40 Yes | 12 No |
Post New Answer View All Answers
Can you run java program without main method?
Can we use synchronized block for primitives?
Can size_t be negative?
Why is it called boolean?
What is java basic concept?
What is difference between add() and addelement() in vector?
What interface is extended by awt event listeners?
Can we define private and protected modifiers for the members in interfaces?
Is list thread safe in java?
what is the constructor and how many types of constructors are used in java?
Explain the access modifiers for a class, method and variables?
What is time complexity java?
Describe the process as to how substring() methodology mechanisms in java.
How do you use equal in java?
List implementations of list interface?