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
What are the 6 functions?
How do you add an element to a set in java?
What is continuity of a function?
What is the SimpleTimeZone class?
What's the difference between comparison done by equals method and == operator?
Does java allow default arguments?
Can we have try without catch block?
Is null a string or object in java?
What is a local class in java?
When do I need to use reflection feature in java?
What is variable in java?
How do you check if a number is a perfect square?
What restrictions are placed on method overriding in java programming?
How do you achieve polymorphism in java?
Describe the process as to how substring() methodology mechanisms in java.