Meaningless Drivel is fun!
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: 397
Hi,
Any one knows about the diamond problem in java Interface.

Please explain with example.

Regards,
Prabhat
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
Here you go: Diamond problem. Java doesn't support multiple inheritance, so it doesn't have this issue.
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: 43978
    
  33
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: 43978
    
  33
Touche. Even Joanne Neal wouldn't have produced a comeback like that
 
Have you checked out Aspose?
 
subject: What is diamond Problem Faced in Multiple inheritence in java ?
 
It's not a secret anymore!