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
What is difference between fail-fast and fail-safe?
Can you call a method on a null object?
why using interface interface ?
What class allows you to read objects directly from a stream?
Explain working of call by reference function invoking.
Give a brief description of java socket programming?
What is the difference between comparison done by equals method and == operator?
What is the function of compareto in java?
Explain the difference between association, aggregation and inheritance relationships.
what invokes a threads run() method? : Java thread
Do I need to import java.lang package any time? Why?
When should I use a singleton?
Can you use this() and super() both in a constructor?
describe method overloading
What is treeset and treemap in java?