纠错
全专业资料、题库、学位、网课
最高直省2344元
上千+科次精品网课
买网课即送全真模考题库
五千+科次教材资料
电子资料满三件9折
五千+科次在线题库
全真呈现历年考试试题
1、[单选题]下面程序片段输出的结果是
int m=7, n=l;
do{
if(m--<++n) break;
}while(m>4);
System.out.printIn("m = "+m+"
n=" +n);
2、[填空题]若已有定义: class Lefthand extends Thread .....并创建了对象: Lefthand left = new
Lefthand0;,则启动线程left的语句是__
3、[填空题]Java规定,switch 关键字之后的表达式的值必须是与____型赋值相容的。
4、[主观题]阅读以下程序,写出该程序的输出结果。
import java.io.lOException;
public class Test3 1 implements Runnable{
private int task=5;
public void run0{
while(task>0){
try{ Thread.sleep(30);
}catchInterruptedException e){ e.printStackTraceO; }
synchronized(his){
System.out.println(Thread. currentThreadO.getName0
+":完成第"+(task--)+"项任务");
}
}
}
public static void main(String[]args){
Test31 actor-new Test310;
new Thread(actor,"Actor").start();
new Thread(actor,"Actor").start();
}
5、[主观题]以下程序从键盘读入I至9之间的一个整数a,然后输出1到a之间的乘法口诀表。
例如,当读入4时,输出的乘法口诀表如下所示:
Copyright © 2010 - 2023 湖南求实创新教育科技有限公司 All Right Reserved.
温馨提示:如您需要的资料本网暂时没有,请于工作日08:00-18:00,点击这里,联系客服及时补充资料。