|
INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: Why multiple inheritace is not supported through classes in java ?
Answer: java does not support Multiple inheritance because
1. If the two super classes(multiple interitance contain more than one super class) has same method, there is confusion in accessing the method
2. in other hand, in the same scenrio, the first super class method method alone will be called always.
3. Final and most important reason is,there is chance for code
ambiguity.
|
|
|
Category |
Java Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7018 users |
Added on |
7/14/2011 |
Views |
71797 |
Rate it! |
|
|
Question:
Why multiple inheritace is not supported through classes in java ?
Answer:
java does not support Multiple inheritance because
1. If the two super classes(multiple interitance contain more than one super class) has same method, there is confusion in accessing the method
2. in other hand, in the same scenrio, the first super class method method alone will be called always.
3. Final and most important reason is,there is chance for code
ambiguity. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Is it necessary that there should be only one controller in MVC architechture? and why?
|
View Answer
|
|
IS String is a wrapperclass? explain wrapper class
|
View Answer
|
|
What is the main difference between access modifiers and access specifiers?
|
View Answer
|
|
How to position TextField in a frame so that it Should look Good.And in a manner that next one will come in next row of the first appeared.
|
View Answer
|
|
How can we invoke private method using refleciotn API(AccessibileObject class)?
|
View Answer
|
|
What is a transient variable
|
View Answer
|
|
What is meant by memory leak?
|
View Answer
|
|
How many layout's are there in java? explain each one of them
|
View Answer
|
|
What are the files generated after using IDL to Java Compilet
|
View Answer
|
|
What is final variable
|
View Answer
|
|
Which method of the Component class is used to set the position andsize of a component
|
View Answer
|
|
What is the difference between the Boolean & operator and the && operator
|
View Answer
|
|
How does multithreading take place on a computer with a single CPU
|
View Answer
|
|
What is the webserver used for running the Servlets
|
View Answer
|
|
What is the difference between a break statement and a continue statement
|
View Answer
|
|
What is the difference between the >> and >>> operators
|
View Answer
|
|
What is the difference between equals and ==
|
View Answer
|
|
Can a lock be acquired on a class
|
View Answer
|
|
Where exactly we make use of Clone objects in a real time?
|
View Answer
|
|
What is upward and downward casting in Java?
|
View Answer
|