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

why java not supproting multiple inheritance?

5 Answers  


Can we access the non-final local variable, inside the local inner class?

0 Answers  


is it mandatory to deaclare all variables public static fianl in interfaces?if i declare like in the below program, public interface A { public static final int I=0; int j=0; } in interface A,what is the difference between I,j?

2 Answers  


Realized?

0 Answers  


I/O blocking means?

1 Answers  


how to convert Java project into Maven ?

0 Answers   Infosys,


Why only one Class is public in one file? Explain in details. Thanks in Advance.

12 Answers  


In what circumstances, compiler will supply a default constructor for a class?

4 Answers  


How is java hashmap implemented?

0 Answers  


What is the difference between import java.util.date and java .util?

0 Answers  


What are the advantages of java over cpp?

0 Answers  


Explain the Propertie sof class?

0 Answers  


Categories