Interface Cdac Patna Noted
Interface Cdac Patna Noted
CDAC PATNA
Overloading –
Two methods are said to be overloaded if and only if , both methods
having same name but different argument(either change type of argument
/ no. of argument/ order of argument)
Return type
CDAC PATNA No restriction Can be different
CDAC PATNA
interface interface_name
{
data member;
methods();
}
Where we can use extends or implements keyword ?
CDAC PATNA
Inside interface every method is always
public& abstract , whether we are
declaring or not . Hence, it is 100%
Every method present inside abstract
class need not be public & abstract.
abstract class
Every variable present inside interface is Every variable present inside abstract
always public statis final class need not to be public statis final
For interface variable compulsory we For abstract class variables we are not
should perform initialization at the time required to perform initialization at the
of declaration (otherwise we get error). time of declaration
THANK YOU
CDAC PATNA