This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes What is diamond Problem Faced in Multiple inheritence in java ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is diamond Problem Faced in Multiple inheritence in java ?" Watch "What is diamond Problem Faced in Multiple inheritence in java ?" New topic
Author

What is diamond Problem Faced in Multiple inheritence in java ?

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Hi,
Any one knows about the diamond problem in java Interface.

Please explain with example.

Regards,
Prabhat
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
Here you go: Diamond problem. Java doesn't support multiple inheritance, so it doesn't have this issue.


Ping & DNS - my free Android networking tools app
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

He is not asking about the diamond problem in combination with inheritance but in combination with interfaces. And it does exist:


But I don't have a solution for you


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
I don't think that is a problem; I am pretty sure that code won't compile: no compilation, no problems at runtime
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Just don't write ANY code AT ALL. Then you don't need to compile anything and you will have no runtime-errors
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
Touche. Even Joanne Neal wouldn't have produced a comeback like that
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is diamond Problem Faced in Multiple inheritence in java ?
 
Similar Threads
When do we use abstract class and interface.
inheritance
WA #1.....word association
How do we solve diamand problem in java
Multiple Inheritance