Answer Posted / atul
class mainoverloaded
{
public void main()
{
System.out.println("Hey");
}
public void main(int a)
{
System.out.println(a);
}
}
class maind
{
public static void main(String ah[])
{
mainoverloaded m=new mainoverloaded();
m.main();
m.main(10);
}
}
please execute this code.it is execute correctly.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to sort array of 0 and 1 in java?
What do you mean by platform independence? What is an interface?
Why should I use abstract class?
How many JVMs can run on a single machine and what is the Just-In-Time(JIT) compiler?
What are the important features of Java 9 release?
Why vector is used in java?
What is google full form?
Why strings in java are called as immutable?
Is null a string?
Is it possible for a yielded thread to get chance for its execution again?
What is ‘is-a ‘ relationship in java?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
What is the gregoriancalendar class in java programming?
Can we declare the static variables and methods in an abstract class?
Why do we need array in java?