-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblem10.java
More file actions
31 lines (24 loc) · 747 Bytes
/
Copy pathProblem10.java
File metadata and controls
31 lines (24 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*This problem was asked by Apple.
Implement a job scheduler which takes in a function f and an integer n, and calls f after n milliseconds.*/
package dailycodingchallange;
import java.time.Clock;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Timer;
import java.util.Date;
public class DAY10 extends Thread{
/**
* @param args the command line arguments
*/
public void run()
{
System.out.println(Thread.currentThread());
System.out.println("Job Scheduler Executed");
}
public static void main(String[] args) throws InterruptedException {
DAY10 D=new DAY10();
Thread f=new Thread();
D.start();
Thread.sleep(1000);
}
}