题目内容

哪些赋值语句正确?

A. float foo=-1;
B. float 0foo=1.0;
C. float 0foo=42cl;
D. float 0foo=2.02f;
E. float 0foo=3.03d;
F. float 0foo=0x0123;

查看答案
更多问题

以下哪些语句无编译错误?

A. StringBuffer sb1=”abcd”;
Booleam b=new Booleam (“abcd”);
C. byte b=255;
D. int x=0x1234;
E. float f1=1.2;

以下哪些语句实现了将数值5赋值给一个int型变量?

A. int testValue=0x5;
B. int testValue=(int) (2.1F+3.4D);
C. int testValue=(octal)5;
D. int testValue=(0x0A>>1);
E. i nt testValue=(0x0A>>>1);

以下那些表达式正确?

A. Object o = new String(“abcd”);
Boolean b = true;
C. Panel p = new Frame();
D. Applet a = new Panel();
E. Panel p = new Applet();

以下哪些有关java.lang.Exception异常类的描述是正确的?

A. 该类是一个公共类。
B. 该类是Throwable类的子类。
C. 该类实现了Throwable接口。
D. 该类可以序列化。

答案查题题库