what is difference between method overloading & method
overridding with example?

Answer Posted / tamilvanan

overloading:
method overloading means method name is same and different
parameter ie different signature.. and overloading method
are present in same class
for eg ,
let us consider show() is a method
1.show(int a)
2.show(int a,int b)
overriding:
method overriding means method name is same and
parameter also same. these are present in different levels
of class
for eg,
let us consider show() is a method
1.show(int a)
2.show(int a)

Is This Answer Correct ?    34 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an immutable class? How to create an immutable class?

776


What does it mean to flush a file?

785


What is a programming object?

763


What is a blocking method in Java?

822


What is a for loop in java?

811


Can a private method be declared as static?

774


Can we execute java program without main method?

721


What are internal variables?

765


What happens when heap memory is full?

737


How many bytes are a float?

701


What is externalizable?

812


How to make a read-only class in java?

807


Can we create constructor in abstract class ?

798


What is the difference between stringbuffer and stringbuilder class?

798


What is ph and buffers?

733