What we have to do, when we don't want to implement all
methods of an interface?

Answers were Sorted based on User's Feedback



What we have to do, when we don't want to implement all methods of an interface?..

Answer / ravikiran(aptech mumbai)

instead of using interface make use of abstract class at
that moment

Is This Answer Correct ?    3 Yes 1 No

What we have to do, when we don't want to implement all methods of an interface?..

Answer / aditya mohata

we have to declare that class as an abstract class.

Is This Answer Correct ?    2 Yes 1 No

What we have to do, when we don't want to implement all methods of an interface?..

Answer / somasundar m

We have to declare that class an abstract class by
declaring that particular unimplemented methods as abstract
method. And you can not create an instance for this class.

Is This Answer Correct ?    0 Yes 0 No

What we have to do, when we don't want to implement all methods of an interface?..

Answer / vinaygeddannavar

YOU SHOULD NOT GO FOR THE INHERIT IN CHILD SPECIFIC CLASS
THATS THE BEST WAY... OTHERWISE IF YOU MAKE IT AS ABSTRACT
CLASS AGAIN YOU NEED TO INHERIT THAT CLASS IN CHILD CLASS OK.

Is This Answer Correct ?    0 Yes 0 No

What we have to do, when we don't want to implement all methods of an interface?..

Answer / mallikarjun

Use another called implementing interface and that class can
be inherited to sub class. This process is called adapter
pattern

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the purpose of final keyword and when to use it?

0 Answers  


What is java and why do we need it? Explain

0 Answers  


Explain access modifiers in java.

0 Answers  


difference between vectorlist and hash

1 Answers   TCS,


What's the default access specifier for variables and methods of a class?

0 Answers  






what is aggregation in java?

0 Answers   IBS,


Explain the significance of class loaders in bootstrap?

0 Answers  


What will happen if a thrown exception is not handled?

0 Answers   ABB, Akamai Technologies, Infogain,


When you say String is immutable, what do you mean by that? Say I have String s = "Ness" s= s+"Technologies"; What will happen? If the value gets appended, then what is the meaning of immutable here?

5 Answers   Ness Technologies,


how can we import the user defined package without classpath?

1 Answers   CSC, Infosys,


What is light weight component?

3 Answers  


what is dynamic method dispatch ?

27 Answers   Fidelity, MUET, SDSF,


Categories