explain about method overloading and method overriding with
difficult examples

Answer Posted / andrea

overloading
two or more methods will have same name but different
arguments. it will be in same class.
overriding
two or more methods will have same name and same
number of arguments but in different classes

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When do you call copy constructor?

725


What will be the default values of all the elements of an array defined as an instance variable?

762


Explain about assignment statement?

786


Which collection is best for sorting in java?

878


What is a method in coding?

785


what methods would you overwrite in java.lang.object class?

751


What is floor math?

682


Why vector is used in java?

755


What is serialversionuid?

768


What is multithreading and its advantages?

796


What is hashing principle in java?

770


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

781


Differece between class and generic class?

779


For class CFoo { }; what default methods will the compiler generate for you>?

818


How to access arraylist elements in java?

696