public class ProvaThread 
{
    public static void main(String[] args) throws InterruptedException
    {
	int[] a = new int[10];

	MyThread t1 = new MyThread(a),
	         t2 = new MyThread(a);
	t1.start();
	t2.start();

	while (true) {
	    System.out.print("[");
	    for (int x: a)
		System.out.print(x + " ");
	    System.out.println("]");
	    Thread.sleep(1000);
	}
    }
}