thanks
Harvinder
cmbhatt
“Everything should be as simple as it is, but not simpler.” Albert Einstein
Originally posted by Harvinder Thakur:
face f = test_one;
boolean b = test_one instanceof face;
boolean b1 = new test() instanceof face;
“Everything should be as simple as it is, but not simpler.” Albert Einstein
Originally posted by Duc Vo:
Not quite right though, in the above, b will be true and b1 will be false. It is perfectly legal since instanceof is just checking if an object is assignable to another class.
thanks
Harvinder
Originally posted by Harvinder Thakur:
I hope i make sense...
“Everything should be as simple as it is, but not simpler.” Albert Einstein
Originally posted by Rekha:
But, there could be a scenario in the future wherein some class could extend 'test' AND implement 'face'.
thanks
Harvinder
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
thanks
Harvinder
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |