/** * Author: Dr. Jay Urbain * Class: SE2811-011 * Date: 1/6/14 7:50 AM * Lesson: Week 4, Day 1 */ package start4_1; public class BadThreads { static String message; private static class CorrectorThread extends Thread { public void run() { try { sleep(1000); } catch (InterruptedException e) {} //Statement 1: message = "I think therefore I am."; } } public static void main(String args[]) throws InterruptedException { Thread t = (new CorrectorThread()); t.start(); message = "I think not therefore I ain't"; Thread.sleep(2000); //Statement 2: System.out.println(message); } }