This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Engine.java | |
public interface Engine { | |
void start(); | |
void stop(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Volatility { | |
static int NEXT_IN_LINE = 0; | |
public static void main(String[] args) throws Exception { | |
new CustomerInLine().start(); | |
new Queue().start(); | |
} | |
static class CustomerInLine extends Thread { |