class ThreadTest6 {
	public static void main(String [] args) {
		PingPong3  ping = new PingPong3("PING",2);
		PingPong3  pong = new PingPong3("pong",4);
		//ping.setPriority(3);
		pong.setPriority(9);		

		pong.start();
		ping.start();
		for(int i=0;i<100;i++)
			System.out.print(i + " ");
		ping.stop();
		//pong.stop();
		}
	}

class PingPong3 extends Thread {
	String word;		// λέξη για εκτύπωση
	int delay;			// χρόνος ανάπαυλας

	PingPong3(String wordToPrint, int pauseTime){
		word = wordToPrint;
		delay = pauseTime;
		}

	public void run() {

			for(int i=0;i<30;i++)
				System.out.print(word +"-" + i + " ");

		}
	}
