How can you force a class to implement only features of our class?

Options
- Only Abstract class
- Only Interface
- Abstract class or Interface
- We can not


CORRECT ANSWER : Only Interface

Discussion Board
We can not

Even if I implement an interface, I can add other methods to the same class.

Pramod 10-19-2016 06:49 AM

Answer should be: we cannot

What prevents us from implementing additional features in the concrete class when we implement an interface or abstract class ?

Is the question correct?

chandranee 02-26-2015 07:08 AM

how could this be right?

we cant should be the right answer? or am i wrong ?
a class could implement more then one interface and it also can extend a abstract class and still add methods and fields of its own...

amit 02-23-2015 08:12 PM

Right answer..Only Interface

Wrong answer..Abstract class or Interface
Right answer..Only Interface

if we want only features of our class to be implemented.. the only way is using Interface not Abstract as Abstract allows us to add even more features in subclass in addition to its unimplemented methods

brindha 10-9-2014 04:55 AM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement