COMP2396
Loading...
Searching...
No Matches
MyRunnable.java
Go to the documentation of this file.
1
public
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
}
MyRunnable
Definition
MyRunnable.java:1
MyRunnable.run
void run()
Definition
MyRunnable.java:2
MyRunnable.doMore
void doMore()
Definition
MyRunnable.java:6
MyRunnable.main
static void main(String[] args)
Definition
MyRunnable.java:10
MyRunnable.go
void go()
Definition
MyRunnable.java:4
Runnable
Thread
chapter11
MyRunnable.java
Generated on Sat Dec 7 2024 17:10:09 for COMP2396 by
1.12.0