These
differences
are
based
on
Java
7:
Overloading
Overriding
Method
overloading
is
within
class.
Method
overriding
occurs
in
two
classes,
parent
and
child.
In
method
overloading,
parameters
must
be
In
method
overriding,
parameters
must
be
different,
or
data
type
must
be
different
or
at
least
same.
sequence
of
parameters
must
be
different
Method
overloading
can't
be
performed
by
only
Return
type
must
be
same
in
method
changing
return
type
of
the
method.
Return
type
overriding.
can
be
same
or
different
in
method
overloading.
In
an
interview,
try
not
to
give
answer
in
a
tabular
format.
It
might
give
a
feeling
to
interviewer
that
you
have
mugged
up
the
definitions
and
differences.
Instead
try
to
explain
what
they
are,
something
like
this.
When
overloading,
you
must
change
either
the
type
or
the
number
of
parameters
for
a
method.
Method
overloading
is
done
to
allow
us
to
use
the
same
methods
names
for
multiple
methods.
The
purpose
behind
this
is
that,
you
might
have
different
functionality
implementation
for
the
same
feature
based
on
the
difference
in
parameters
and
in
that
scenario
you
definitely
want
the
same
method
names
to
be
able
to
relate
all
of
them
with
the
feature.
Overriding
means
that
a
method
inherited
from
a
parent
class
will
be
changed.
But,
when
overriding
a
method
everything
remains
exactly
the
same
except
the
method
implementation.
What
the
method
does
is
changed
to
fit
in
with
the
needs
of
the
child
class.
But,
the
method
name,
the
number
and
types
of
parameters,
and
the
return
type
will
all
remain
the
same.