MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / main

Method main

data/java/07_threads.java:2–19  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

1class ThreadsDemo {
2 public static void main(String[] args) throws InterruptedException {
3 Runnable worker = () -> {
4 for (int i = 1; i <= 3; i++) {
5 System.out.println("Typing tick " + i);
6 try {
7 Thread.sleep(100);
8 } catch (InterruptedException e) {
9 Thread.currentThread().interrupt();
10 }
11 }
12 };
13
14 Thread thread = new Thread(worker);
15 thread.start();
16 thread.join();
17
18 System.out.println("Session complete");
19 }
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected