function of extends and implements keywords?

Answers were Sorted based on User's Feedback



function of extends and implements keywords? ..

Answer / jitender arora

Extending means adding new method definitions. Implementing
means satisfying the existing interface contract by writing
the proscribed method bodies.

When you derive a class from a base class we say the
derived subclass extends the base class. An interface can
also extend another interface. In contrast, when a class
provides the methods (possibly abstract) necessary to
conform to some interface we say that class implements the
interface. Extending a class is closely related to
implementing an interface. A new class can extend at most
one superclass, but it may implement several interfaces.
In interface may extend several other interfaces (though a
class implements an interface). You sometimes do this to
give you a short same to stand for the requirement
implementing half a dozen related interfaces.

Is This Answer Correct ?    2 Yes 0 No

function of extends and implements keywords? ..

Answer / mayur kumar

extends is used to inherite a class and implement is used
to inherit an interface.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

What state does a thread enter when it terminates its processing?

0 Answers  


What is ioc concept & explain it?

0 Answers  


How JNDI is used in JMS ?

1 Answers  


What is threadfactory?

0 Answers  


Do we need to override service() method

0 Answers  






What is a session? Can you share a session object between different theads?

0 Answers  


how team leaders assign work for the team member like through papers,word document

1 Answers   TCS,


What is a class loader? What are the different class loaders used by jvm?

0 Answers  


What is source and listener?

1 Answers  


Does Java pass arguments by value or reference?

5 Answers   HeadStrong,


Why are some of the class and element names counter-intuitive?

0 Answers  


What is J2EE?

2 Answers  


Categories