单选题Java语言具有许多优点和特点,下列选项中______是通过Java虚拟机实现的特点。
单选题为使下列代码正常运行,应该在下画线处填入的选项是( )。 int[]numbers=new int[n]; for(int i=0;i<numbers.______;i++) numbers[i]=i+1; A.size B.length C.dimension D.measurement
单选题请阅读下面程序 public class ThreadTest public static vodi main(Sting args[]) Thread t1=new Thread(new Hello()); Thread t2=new Thread(new Hello()); t1.start(); t2.start(); class Hello implements Runnable int i; public void run() while (true) System.out.printIn("Hello"+i++); if(i==5) break; 该程序创建线程使用的方法是______。
单选题下列关于内部类的说法,正确的是
单选题下列循环执行的次数是( )。 int y=2,x;4; while(--x!=x/y) A) 1 B) 2 C) 3 D) 0
单选题当一个应用程序的所有非守护线程终止运行时,但仍然有守护线程在运行,应用程序将
单选题为了支持压栈线程与弹栈线程之间的交互与同步,在程序的下画线处依次填入的语句是______。 public class IntStack private int idx=0; private int [] data=new int[8]; public void push(int i) datal-[idx]=i; idx++; ______ …… A.synchronized() notify() B.synchronized this. wait() C.synchronized this. notify() D.Serializable sleep()
单选题Swing采用的设计规范是{{U}} {{/U}}。
A. 控制一模式一视图
B. 控制一视图一模式
C. 视图一模式一控制
D. 模式一视图一控制
单选题使用语句scanf("x=%f,y=%f",&x,&y);,输入变量x、y的值,正确的输入是( )。 A.1.25,2.4 B.1.25 2.4 C.x=1.25,y=2.4 D.x=1.25 y=2.4
单选题有以下程序: #include <stdio.h> #include<string.h> struct A int a;char b[10]; double c;; struct A f(struct A t); main() struct A a=1001,"ZhangDa",1098.0; a=f(a); printf("%d,%s,%6.1f/n",a.a,a.b,a.c); struct A f(struct A t) (t.a=1002; strcpy(t.b,"ChangRong");t.c=1202.0; return t;) 程序运行后输出的结果是( )。 A.1001,ZhangDa,1098.0 B.1002,ZhangDa,1202.0 C.1001,ChangRong,1098.0 D.1002,ChangRong,1202.0
单选题String、StingBuffer都是______类,都不能被继承。
A.static
B.abstract
C.final
D.Drivate
单选题下面______是合法的标识符。 A.$persons B.2Users C.*point D.this
单选题新L/O技术和java.util.zip中的类相结合,Java采用下列哪项技术用在数字传输技术领域,可以提高数字传输速度,并进行差错控制?
单选题下列程序的运算结果是______。
public class Test{
public static void main(String[] args){
int m=new int[] (1,2,3,4,5,6,7,8);
int sum=0;
for(int i=0;i<8;i++) {
sum+ =m[i];
if(i==3) break;
}
System.out.println(sum);
}
单选题下列代码的执行结果是______。
public class Test3{
public static void main(String args[]){
System.out.println(100%3);
System.out.println(100%3.0);
}
}
单选题下面哪个不是InputStream类中的方法? A) int read(byte[]) B) void flush() C) void close() D) int available()
单选题以下程序段的输出结果为 {{U}} {{/U}}int
j=2;switch(j){case 2:System.out.print("two.");case
2+1:System.out.println("three.");breakdefault:System.out.println("value
is"+j);break;}
A. two.three.
B. two.
C. three.
D. value is 2
单选题Applet也是一个AWT组件,因而也具有一般AWT组件的图形绘制功能,______方法用于进行绘图的具体操作。
单选题下列叙述中正确的是______。
单选题下面程序段的输出结果为( )。 public class Test public static void main(String args[]) booleana,b,c; a=(3<5); b=(a==true); System.out.println("a="+a+"b="+b); c=(b==false); System.out.println("b="+b+"c="+c); A.a=true b=false b=true c=true B.a=true b=false b=true c=false C.a=true b=true b=true c=false D.a=false b=false b=true c=false