( 18 )阅读下列程序
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;
}
}
}
下列对程序运行结果描述的选项中,正确的是
A)每行的( x,y )中,可能有;每一对( x,y )值都出现两次。
B)每行的( x,y )中,可能有;每一对( x,y )值仅出现一次。
C)每行的( x,y )中,可能有 x=y ;每一对( x,y )值都出现两次。
D)每行的( x,y )中,可能有 x=y ;每一对( x,y )值都出现一次。