题目内容

下列代码中哪行有错误?public class Test{public static void main(String args[]){char c='\uabcg';byte b=127;int x=100;float f=3.14F;}}

A. char c='\uabcg';
B. byte b=127;
C. int x=100;
D. float f=3.14F;

查看答案
更多问题

下列代码中哪行有错误?publicclassTest{publicstaticvoidmain(Stringargs[]){charc='\uabcf';byteb=127;intpublic=100;floatf=3.14F;}}

A. charc='\uabcf';
B. byteb=127;
C. intpublic=100;
D. floatf=3.14F;

下列代码中哪行有错误?publicclassTest{publicstaticvoidmain(Stringargs[]){charc='a';byteb=128;intheight=100;floatf=3.14F;}}

A. charc='a';
B. byteb=128;
C. intheight=100;
D. floatf=3.14F;

下列代码中哪行有错误?publicclassTest{publicstaticvoidmain(Stringargs[]){charc=65536;byteb=127;intheight=100;floatf=3.14F;}}

A. charc=65536;
B. byteb=127;
C. intheight=100;
D. floatf=3.14F;

下列代码中哪行有错误?publicclassTest{publicstaticvoidmain(Stringargs[]){int x=8;byteb=127;b=x;x='a';long y=b;float z=(int)6.89;}}

A. b=x;
B. x='a';
C. long y=b;
D. float z=(int)6.89;

答案查题题库