(完整word版)Java试题.pdf
《(完整word版)Java试题.pdf》由会员分享,可在线阅读,更多相关《(完整word版)Java试题.pdf(17页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、一单选题(20*2=40 分)1.向堆栈 stack 中插入一个数据obj,栈顶指向标为 top,其操作步骤是 _ A)stack.push(obj);B)stack.push(obj);top+;C)top+;stack.push(obj);D)stack.push(obj);stack.pop();top+;2.执行下列程序段后,y 的值变为。int x,y;for(y=1,x=1;y=10)break;if(x%2=1)x+=5;continue;x-=3;A)3 B)4 C)5 D)6 3.当你试图编译运行下列代码的时候会发生什么?精品资料-欢迎下载-欢迎下载 名师归纳-第 1 页,共
2、 17 页 -public class Runt implements Runnable public static void main(String argv)Runt r=new Runt();Thread t=new Thread(r);t.start();public void start()for(int i=0;i=10);C.boolean a=真;D.boolean a=false;10.以下()不是合法的标识符精品资料-欢迎下载-欢迎下载 名师归纳-第 4 页,共 17 页 -文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:C
3、P10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4
4、H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW
5、10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I
6、6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H1
7、0 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D
8、10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档
9、编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9A.STRING B.x3x;C.void D.de$f 11表达式(11+
10、3*8)/4%3 的值是()A.31 B.0 C.1 D.2 12.下列值不为 true 的表达式有()。A.john=john B.john.equals(john)C.john=john D.john.equals(new String(john)13.下列代码输出结果是()int i=10;while(i 0)i=i+1;if(i=10)break;精品资料-欢迎下载-欢迎下载 名师归纳-第 5 页,共 17 页 -文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H
11、9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW1
12、0I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6
13、O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10
14、 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D1
15、0R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编
16、码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L
17、7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9A.while 循环执行 10 次B.死循环C.循环一次都不执行D.循环执行一次14.在 java 中下列关于自动类型转换说法正确的是()a)基本数据
18、类型和 String相加结果一定是字符串型b)char 类型和 int类型相加结果一定是字符c)double 类型可以自动转换为int d)char+int+double+结果一定是 double;15.score是一个整数数组,有五个元素,已经正确初始化并赋值,仔细阅读下面代码,程序运行结果是()temp=score0;for(int index=1;index 5;index+)if(scoreindex 0)try Thread.sleep(1000);/先让线程暂停 1秒种System.out.println(Thread.currentThread().getName()+卖出一张票
19、 +tickets-);catch(Exception e)e.printStackTrace();3.以下程序是通过实现接口的方式来创建了一个计时器的功能,在显示的窗体中显示计时的数字,请将代码补充完整;import java.awt.Frame;import java.awt.Label;精品资料-欢迎下载-欢迎下载 名师归纳-第 14 页,共 17 页 -文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V
20、2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL
21、8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3
22、K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:C
23、P10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4
24、H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW10I1L7A4H9文档编码:CP10D10R3K9H10 HL8O3I6O9V2 ZW
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 完整 word Java 试题
限制150内