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
Explain the difference between abstraction and encapsulation.
Why main() method is public, static and void in java ?
What is java util?
What is a parent class in java?
Can you extend singleton class?
Why is java called the platform independent programming language?
what is the use of bean managed and container managed with example?
What are the advantages of arraylist over arrays?
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
Can you inherit a constructor java?
What is a map? What are the implementations of map?
What is the scope or life time of instance variables?
Can we assign null to double in java?
Can a class be declared as static?
Which keyword specify that a variable is effectively final ?