Quiz 7
Threaded design and thread-safety questions.
We'll cover the following...
Question # 1
Can you enumerate the implications of the poor design choice for the below class?
public class BadClassDesign {
private File file;
public BadClassDesign() throws InterruptedException {
Thread t = new Thread(() -> {
System.out.println(this.file);
});
t.start();
t.join();
}
}