多选题 Given:
2. class Jog implements Runnable {
3. public void run() {
4. for(int i = 0; i < 8; i++) {
5. try {Thread.sleep(200); }
6. catch (Exception e) {System.out.print("exc "); }
7. System.out.print (i + " ");
8. } } }
9. public class Marathon {
10. public static void main(String[] args) throws Exception {
11. Jog j1 = new Jog();
12. Thread t1 = new Thread(j1);
13. t1.start();
14. t1.sleep(500);
15. System.out.print("pre ");
16. t1. interrupt();
17. t1.sleep(500);
18. System.out.print("post ");
19. } }
Assuming that sleep() sleeps for about the amount of time specified in its argument, and that all other code runs almost instantly, which output is likely? (Choose all that apply.)
【正确答案】 F
【答案解析】