public class Test { public static void main(String[] s) { Test t = new Test(); Bhasad b1 = new Bhasad(); Thread t1 = new Thread(b1); t1.start(); } }
class Bhasad extends Thread { int jink = 500; public void Ragad() { System.out.println("jink"); } public void ABC() { while(true) { System.out.println(jink); } } public void MNO() { while(true) { System.out.println("Garg"); } } public void run() { ABC(); MNO(); } } This is my simple code in this I have not to use sleep(); and how can I make both method accessible --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---