相关题目
在一个线程中调用下列方法,不会改变该线程运行状态的是:
在下列程序的空白处,应填入的正确选项是:
import java.io.*;
public class writeInt{
public static void main(string[ ] a) {
int[ ] myArray = {10,20,30,40};
try{
DataOutputSystem dos= new DataOutputSystem
(new FileOutputSystem("ints.dat"));
for (int i=0;i
dos. ______
System.out.println ("Have written binary file ints.dat");
}
catch(IOException ioe)
{ System.out.println("IO Exception");
}
}
}
如果线程正处于运行状态,则它可能到达的下一个状态是:
阅读下列程序
public class Test implements Runnable{
private int x=0;
private int y=o;
boolean flag=true;
public static void main(string[ ] args) {
Test r =new Test( );
Thead t1=new Thead(r);
Thead t2=new Thead(r);
t1.start( );
t2.start( );
}
public void run(){
while(flag) {
x++;
y++;
System.out.println("(" +x_ ","+y+")");
if (x>=10)
flag=false;
}
}
}
下列对程序运行结果描述的选项中,正确的是:
下列表达式中,类型可以作为int型的是:
下列语句中,可以作为无限循环语句的是:
下列运算结果为1的是:
下列运算符中,优先级最高的是:
AWT中用来表示对话框的类是:
点击窗口内的按钮时,产生的事件是:
