SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
Siva Masilamani wrote:Any Interface can be cast to any non final Class type eventhough the class did not implement the interface
"A problem well stated is a problem half solved.” - Charles F. Kettering
SCJP 6, OCPJWCD
Nidhi Sar wrote:
Any enlightenment?
That interface object can NEVER be an object of that class
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
"A problem well stated is a problem half solved.” - Charles F. Kettering
SCJP 6, OCPJWCD
Tony King wrote:
Now I should have understood why my code is good for compiler but i don't understand why there are not runtime error at line 18 (Min m2 = (C) b2;).
What is the type of b2 object (not reference) at line 18?
Tony King wrote:
If I change this line with:
it gives me runtime error.. why?
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|