1 | class CastObjectReference { |
2 | |
3 | void m() { |
4 | Integer integer = new Integer(0); |
5 | Object object = integer; |
6 | Integer otherReference = (Integer) object; |
7 | } |
8 | |
9 | } |
checkcast
instruction. Instruction checkcast
may throw runtime exception ClassCastException if check had failed.