Specifications

Sun Services
Java™ Programming Language
Module 13, slide 6 of 37
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Creating the Thread
Multithreaded programming has these characteristics:
Multiple threads are from one Runnable instance.
Threads share the same data and code.
For example:
Thread t1 = new Thread(r);
Thread t2 = new Thread(r);
CPU
Code Data
HelloRunner
Instance “r
Thread t
}
New Thread
Class
of HelloRunner