COMP2396
Loading...
Searching...
No Matches
MyRunnable.java
Go to the documentation of this file.
1public class MyRunnable implements Runnable {
2 public void run() { go(); }
3
4 public void go() { doMore(); }
5
6 public void doMore() {
7 System.out.println("top of the stack");
8 }
9
10 public static void main(String[] args) {
11 Runnable threadJob = new MyRunnable();
12 Thread myThread = new Thread(threadJob);
13 myThread.start();
14 System.out.println("back in main");
15 }
16}
void run()
void doMore()
static void main(String[] args)
void go()