Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Core Java
« Previous
Next »
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
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲