Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class star extends Thread
- {
- public void run()
- {
- int i;
- try
- {
- for(i=1;i<=7;i++)
- {
- System.out.print("*");
- Thread.sleep(2);
- }
- }
- catch(InterruptedException ie)
- {
- System.out.println(ie);
- }
- }
- }
- class slash extends Thread
- {
- public void run()
- {
- int i;
- try
- {
- for(i=1;i<=7;i++)
- {
- System.out.print("/");
- Thread.sleep(2);
- }
- }
- catch(InterruptedException ie)
- {
- System.out.println(ie);
- }
- }
- }
- class pattern
- {
- public static void main(String args[])
- {
- star a = new star();
- slash b = new slash();
- a.start();
- b.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement