class abc extends Thread { @Override public void run () { System.out.println(" hello "); System.out.println(" world "); fg( ) ; System.out.println(" command "); System.out.println(" delete "); } synchronized void fg () { try { Thread.sleep ( 1000 ) ; notify () ; } catch ( InterruptedException e) { System.out.println(" caught "); } } } public class using_notify { public static void main(String[] args) { abc w = new abc () ; w.start () ; System.out.println(" hi "); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)