对于下列代码,标注的行(中,哪个会有代码错误.( ) public class Test{ public static void main(String args[]){ byte b=‘a’; //A int n=100; char c=65; //B b=b; //C b=b+1; //D } }A.有 B.有 C.有 D.有
A. 出现
B. 不出现
C. 不出现
D. 不出现
查看答案
表达式式(11+3*8)/43的值是( ) A. 31 B. 0 C. 1 D. 2
A. 错误。
B. 错误。
C. 错误。
D. 正确。
对于int n=6789;下列表达式的值为7的是( ) A. n%10 B. n/10%10 C. n/100%10 D. n/1000%10
A. 错误。
B. 错误。
C. 正确。
D. 错误。
对于Test.java,下列叙述正确的是 ( ) public class Test{ public static void main(String args[]){ boolean boo=false; if(boo==true){ System.out.println(“hello”); System.out.println(“你好”); } else{ System.out.println(“ok”); System.out.println(“yes”); } } }A.出现编译错误 B.程序的输出结果是hello你好 C.程序的输出结果是ok D.程序的输出结果是okyes
A. 错误
B. 错误
C. 错误
D. 正确。
以下代码在需要填写的部分,填上哪个( )选择,编译器会出错? public class E{ public static void main(String args[]){ int m=10; int n=0; while( ){ n++; } } }A. m-->0 B. m++>0 C. m=0 D.m>100&&true
A. 出现
B. 出现
C. 出现。
D. 出现。