I'm following this "by the book" literally. Getting "cannot find symbol" for the Thread. It appears that the thread will only accept a string, when I'm giving it an object from my Process". The example from the book is the same.
public class Runner
{
public static void main(String[] args) {
Process th1 = new Process("thread 2");
Thread thread1 = new Thread(th1); // Issues is here
thread1.start();
System.out.println(Thread.currentThread());
}
}
package dataanalyzer;
public class Process implements Runnable
{
public String name;
public Process(){
}
public Process(String threadName) {
name = threadName;
}
public void run(){
System.out.println(Thread.currentThread());
}
}
Thanks!