单项选择题
下列程序的执行结果为( )。
public class c3
public static void main (String args[])
int i=13,j=10;
if (i-->j)
i++;
else j--;
System. out.println (i+"\t"+j);
A.13 10
B.12 11
C.11 11
D.12 12
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
如下程序的输出结果是( )。 public class Test void printValue(int m) do System.out.println( The value is +m); while(--m > 10 ) public static void main(String args[]) int i=10; Test t= new Test(); t.printValue(i);
A.The value is 8
B.The value is 9
C.The value is 10
D.The value is 11
点击查看答案&解析
单项选择题
下列程序从标准输入设备——键盘读入一个字符,然后再输出到屏幕。要想完成此功能,画线处应该填入的语句为( )。 import java.io.*; public class Test public static void main(String args[ ]) char ch; try ______; System.out.println(ch); catch(IOException e) e.printStackTrace();
A.ch= System.in.read();
B.ch=(char)Systcm in.read();
C.ch=(char)System.in.readln();
D.ch=(int)System in.read();
点击查看答案&解析
相关试题
在数据库逻辑结构的设计中,将E-R模型转换...
希望编写好的Java程序代码,应遵守命名规则...
通过参数定制Applet,请在下划线处编写适当...
在传递给实现了java.awt.event.MouseMot...
如果一个Java Applet源程序文件只定义有一...