aspose file tools*
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
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: 387
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: 39548
    
  27
Here you go: Diamond problem. Java doesn't support multiple inheritance, so it doesn't have this issue.


Ping & DNS - updated with new look and Ping home screen widget
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: 36508
    
  16
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: 36508
    
  16
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
Multiple Inheritance
When do we use abstract class and interface.
How do we solve diamand problem in java
inheritance
WA #1.....word association