Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java Part 2
« Previous
Next »
Does Java support multiple inheritance?
Options
- No
- Yes
CORRECT ANSWER : No
Discussion Board
Multiple Inheritance
Java doesn't support multiple inheritance due to its simplicity. For example consider there are two classes B and C inheriting from A.
Now B and C consists of an overrided inherited method and they provide their own implementation for it.
Suppose D is another class inherits from both B and C using multiple inheritance then D should also inherits the overridden method but the confusion it will have that which overriden method it should involve which leads to the ambiguous case.
In C++ this kind of trap that a class can get into but there is no scope of occurrence in Java as there is no multiple inheritance. All the communication takes place with the help of interfaces in Java.
Rohit Sharma 08-6-2014 05:41 PM
should be yes ?
Why "no ?" ..what about inheriting from multiple interfaces ?
ali 12-7-2013 05:01 PM
« 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
▲