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 an example of a constant variable?

0 Answers  


Explain different types of wrapper classes in java?

0 Answers  


Why do we use regex?

0 Answers  


How do you define a singleton class?

0 Answers  


What is meant by wrapper classes?

3 Answers  






Give us a program to check for parenthesis matching using stack.

0 Answers   Genpact,


What does index mean in java?

0 Answers  


If all the methods in abstract class are declared as abstract then what is difference between abstract class and in interface?

8 Answers   Infosys, Synechron,


why java does not have operator overloading?

2 Answers  


What are Encapsulation, Polymorphism and Inheritance?

5 Answers  


What are the different collection views provided by maps?

0 Answers  


Explain the difference between throw and throws in java?

0 Answers  


Categories