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

Why use a datasource when you can directly specify a connection details? (in a J2EE application)

1 Answers  


what are memory considerations of jsp compares to other web components?

0 Answers   TCS,


How do you maintain a stateful session object across the session

2 Answers   HCL,


difference between apllet and interface class

1 Answers   Infotech,


Define aop(assepct oriented programing)?

0 Answers  






whether the connectionpooling used in struts?

2 Answers   SolutionNET,


what is the use of State Factories?

0 Answers  


Is “abc” a primitive value?

0 Answers  


Explain what is synchronization?

0 Answers  


How many JSP scripting elements and what are they?

4 Answers   TCS,


What invokes a thread?s run() method?

2 Answers  


What is the difference between java class and bean?

0 Answers  


Categories