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
How do you initialize an arraylist in java?
What if constructor is protected in java?
What is an empty list in java?
What is the largest number a double can hold?
How define set in java?
How to provide security in java
What is immutability in java?
What is a singleton puppy?
What is time complexity java?
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
What is the difference between call by reference and call by pointer?
Is null false in java?
Why are functions called methods in java?
List some important characteristics on jre
How can you say java is object oriented?