Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array Question

 
Minu Sam
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because ClassCastException extends RuntimeException. It will be resolved at runtime.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic