explain about method overloading and method overriding with
difficult examples
Answer Posted / mayank sharma
Clas A
{
Virtual void hi(int a)
{
}
}
Class B:A
{
public overrid void hi(int a)
{
}
}
Overloading simply involves having a method with the same
name within the class.
Example for Over loading
Class A
{
class a()
{
}
class a(int a)
{
}
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is java ceil?
What is the size of integer?
What is the biggest integer?
Why stringbuffer is faster than string?
What is method reference?
Why is boolean important?
Why java is platform independent? Explain.
When do I need to use reflection feature in java?
Is arraylist zero based?
Does garbage collection occur in permanent generation space in jvm?
What is the main purpose of java?
What is java virtual machine? Explain
How do you clear a method in java?
What is an abstract class and what is it’s purpose?
What are the main uses of this keyword?