aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Array Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Array Question" Watch "Array Question" New topic
Author

Array Question

Minu Sam
Greenhorn

Joined: Apr 26, 2012
Posts: 10
All,

Please look below:I have question why is the last line( arr2 = (int[])o1; ) in the code..not a compile time error rather it is a runtime error.




Will appreciate any input.
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Because ClassCastException extends RuntimeException. It will be resolved at runtime.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Array Question