可学答题网 > 问答 > OCJP(310-065)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Given: Which code, inserte


Given: Which code, inserted at line 16, will cause a java.lang.ClassCastException?()

  • AAlpha a = x;
  • BFoo f = (Delta)x;
  • CFoo f = (Alpha)x;
  • DBeta b = (Beta)(Alpha)x;
参考答案
参考解析:
分类:OCJP(310-065)题库
相关推荐

1、Which code, inserted a

Which code, inserted at line 14, allows the Sprite class to compile?()ADirection d = NORTH...

2、Which code, inserted a

Which code, inserted at line 15, creates an instance of the Point class defined in Line...

3、Which code, inserted a

Which code, inserted at line 15, allows the class Sprite to compile?()AFoo{public int bar(){r...

4、Which code, inserted a

Which code, inserted at line 4, guarantees that this program will output [1, 2]?()ASet se...

5、Given: Which two, inserted

Given:Which&ensp;two,&ensp;inserted&ensp;at&ensp;line&ensp;11,&ensp;will&ensp;allow&ensp;the&ensp;code&ensp;to&ensp;compile?()Apublic&ensp;class&ensp;MinMax<...

6、Which code, inserted a

Which&ensp;code,&ensp;inserted&ensp;at&ensp;line&ensp;14,&ensp;will&ensp;allow&ensp;this&ensp;class&ensp;to&ensp;correctly&ensp;serialize&ensp;and&ensp;deserialize...