vibha Gupta wrote:I read if we have two methods with same name in two different super classes and theses 2 classes was inherited by one child class .In this case child class will confuse whom method should call.
Kristina Hansen wrote:Well, in just four words: because someone decided so.
Paul Clapham wrote:
Sure, it wasn't just the result of a coin toss. (Or maybe it was!) There are good reasons for not supporting multiple inheritance and we can speculate why they found those reasons better than the reasons for supporting multiple inheritance. And we could discuss those reasons (both sets) but in the end we won't ever know what the designers were thinking that day.
Lots of Java®'s rules are so much stricter and the loss of ambiguity is a really good thing. Even when you get unexpected results like that in this recent thread.
Tim Holloway wrote:. . . . Java's overload rules are much more precise and don't allow ambiguity.
I don't think I am a fan of operator overloading, but I can see how nice it would have been to write,But (a proper red rag to a bull for some people) what about unsigned integers?
. . . operator overloading. . . . .
That would allow for precise calculations for money. But, as you say, we have to deal with what we have been given.
Tim Holloway wrote:. . . native number format that's precise to 2, 3, or 4 decimal places like COBOL . . .
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Appshttps://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous