public static synchronized void main(String[] args) throwsInterruptedException { Thread t = new Thread(); t.start(); System.out.print("X"); t.wait(10000); System.out.print("Y");}