What is the difference between overloading and overriding a
function?
Answer Posted / raj kashyap
OVERLOADING is possible to create methods that have the same
name, but different parameters lists and different
definitions.overloading is used when objects are required to
perform similar task but using different parameters.
OVERRIDING is used when we want an object to respond to the
same method but have different behaviour when that method is
called. that means we override the method defined in super
class.yhis is possible by defining a method in subclass that
has same name,same argument& same return typeas method in
super class.
Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
What is java oops?
What is an empty string in css?
Is hashmap thread safe?
What is the difference between compiler and jvm?
What is sizeof in java?
define polymorphism in java
What is a singleton puppy?
Add a value x to array from index l to r where 0 <= l <= r <= n-1
Is ++ operator is thread safe in java?
Does java trim remove newline?
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
Why bytecode is called bytecode?
What language is an assembler written in?
What is executor memory?
What does super keyword do?