阅读下列程序:public class Test im

阅读下列程序:

public class Test implements Runnable{
    private int x=0;
    private int y=0;
    boolean flag=true;
    public static void main(String[] args){
        Test r=new Test();
        Thread t1=new Thread(r);
        Thread t2=new Thread(r);
        t1.start();
        t2.start();
    }
    public void run(){
        while(flag){
            x++;
            y++;
            System.out.println("("+x+","+y+")");
            if(x>=10) flag=false;
        }
    }
}

下列对程序运行结果描述的选项中,正确的是( )。

答案
B

题目信息

题号:5626
题型:单选题
难度:普通