SCJP试题分析3修正版.docVIP

  • 20
  • 0
  • 约9.38万字
  • 约 29页
  • 2016-11-06 发布于河南
  • 举报
SCJP试题分析3修正版

SCJP试题分析3修正版 41、Which of the following statements are legal? A. long l = 4990; B. int i = 4L; C. float f = 1.1; D. double d = 34.4; E. double t = 0.9F. (ade) 题目:下面的哪些声明是合法的。 此题的考点是数字的表示法和基本数据类型的类型自动转换,没有小数点的数字被认为是int型数,带有小数点的数被认为是double型的数,其它的使用在数字后面加一个字母表示数据类型,加l或者L是long型,加d或者D是double,加f或者F是float,可以将低精度的数字赋值给高精度的变量,反之则需要进行强制类型转换,例如将int,short,byte赋值给long型时不需要显式的类型转换,反之,将long型数赋值给byte,short,int型时需要强制转换(int a=(int)123L;)。 42、 public class Parent { int change() {…} } class Child extends Parent { } Which methods can be added into class Child? A. public int change(){} B. int chang

文档评论(0)

1亿VIP精品文档

相关文档