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 does main method?
What is private static class in java?
What is meant by class and object in java?
Can an interface have a class?
What is serialization in java?
What is return used for in java?
What is integer size in java?
What are abstract methods in java?
What is byte code and why is it important to java’s use for internet programming?
What is the use of parse function in java?
What is difference between throw and throws ?
What is port number in java?
Difference between class#getinstance() and new operator ?
What are the new features in java 8? Explain
Is assembly language a low level language?