多选题
Given:
2. public class Checkout2 implements Runnable {
3. void doStuff() { }
4. synchronized void doSynch() {
5. try {Thread.sleep(1000); }
6. catch (Exception e) {System.out.print("e "); }
7. }
8. public static void main(String[] args) {
9. long start = System.currentTimeMillis();
10. new Thread(new Checkout2()) .start();
11. Thread t1 = new Thread(new Checkout2());
12. t1.start();
13. try {t1.join();}
14. catch (Exception e) {System.out.print("e "); }
15. System.out.print in ("elapsed: " + (System.currentTimeMillis() - start));
16. }
17. public void run() {
18. for(int j = 0; j < 4; j++) {
19. doStuff();
20. try {Thread.sleep(1000); }
21. catch (Exception e) {System.out.print("e "); }
22. doSynch();
23. } } }
Which are true? (Choose all that apply.)