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


Please Help Members By Posting Answers For Below Questions

What does snprintf return?

768


Give me some null interfaces in java?

797


What is meant by class loader? How many types are there?

915


What is lifetime variable?

729


Which collections are thread safe in java?

692


What is a parameter example?

722


What is the syntax and characteristics of a lambda expression? Explain

786


What do you mean by inner class in java? Explain

804


Why deletion in linkedlist is fast than arraylist?

767


If a variable is declared as private, where may the variable be accessed?

798


Define an applet in java?

837


describe synchronization in respect to multithreading? : Java thread

704


What are the 3 types of loops in java?

721


What is a conditional equation?

769


What is a nonetype?

777