Advertisement
d1i2p3a4k5

14.*/*/*/*/*/*/*/

Oct 18th, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. class star extends Thread
  2. {
  3.     public void run()
  4.     {
  5.         int i;
  6.         try
  7.         {
  8.             for(i=1;i<=7;i++)
  9.             {
  10.                 System.out.print("*");
  11.                 Thread.sleep(2);
  12.             }
  13.         }
  14.         catch(InterruptedException ie)
  15.         {
  16.             System.out.println(ie);
  17.         }
  18.     }
  19. }
  20. class slash extends Thread
  21. {
  22.     public void run()
  23.     {
  24.         int i;
  25.         try
  26.         {
  27.             for(i=1;i<=7;i++)
  28.             {
  29.                 System.out.print("/");
  30.                 Thread.sleep(2);
  31.             }
  32.         }
  33.         catch(InterruptedException ie)
  34.         {
  35.             System.out.println(ie);
  36.         }
  37.     }
  38. }
  39. class pattern
  40. {
  41.     public static void main(String args[])
  42.     {
  43.         star a = new star();
  44.         slash b = new slash();
  45.         a.start();
  46.         b.start();
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement