hi, i got this question from the jhcq.net mock exam page:
What will happen if you attempt to compile and run the following code?
1) Compile and run without error 2) Compile time Exception 3) Runtime Exception
The answer is supposedly 3) cus the guy says that its not allowed to cast down from a higher object to a lower object..in the same hierarchy...my question is WHY? In primitives...cant you cast down from a float to an int? or is it different for objects?
oh and the code tags we have at d ranch..do they automatically format the code..or i still have to arrange it myself? thankx
"Human beings can alter their lives by altering their state of mind" William James