以下哪些是synchronized修饰符可以修饰的对象?
A. 类中方法
B. 对象中方法
C. 方法中的代码块
D. 变量
E. 类
查看答案
以下哪些语句存在语法错误?
A. dcfault String s;
B. transient int i=41;
C. public final static native int w();
D. abstract double d;
E. abstract final double hyperbolicCosine();
哪些赋值语句正确?
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);