Yurttas/PL/OOL/Java/F/07/01/T01.java
Jump to navigation
Jump to search
1/**
2 * Copyright(C) 1998
3 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4 *
5 * Permission to use, copy, modify, and distribute this
6 * software and its documentation for EDUCATIONAL purposes
7 * and without fee is hereby granted provided that this
8 * copyright notice appears in all copies.
9 *
10 * @date : January 1, 1998.
11 * @author : Salih Yurttas.
12 */
13
14
15public class T01 {
16
17 public static void main (String[] args) {
18 int delay1,
19 delay2;
20
21 switch(args.length) {
22 case 2 : delay1 = Integer.parseInt(args[0]);
23 delay2 = Integer.parseInt(args[1]);
24 break;
25 default: delay1 = 10;
26 delay2 = 60;
27 }
28
29 T thread1 = new T("Thread 1",
30 delay1);
31 T thread2 = new T(" Thread 2",
32 delay2);
33
34 thread1.start();
35 thread2.start();
36 }
37
38}