Question 81
Given the code fragments:
class ThreadRunner implements Runnable {
public void run () { System.out.print ("Runnable") ; }
}
class ThreadCaller implements Callable {
Public String call () throws Exception {return "Callable"; )
}
and
ExecutorService es = Executors.newCachedThreadPool ();
Runnable r1 = new ThreadRunner ();
Callable c1 = new ThreadCaller ();
// line n1
es.shutdown();
Which code fragment can be inserted at line n1to start r1and c1 threads?
class ThreadRunner implements Runnable {
public void run () { System.out.print ("Runnable") ; }
}
class ThreadCaller implements Callable {
Public String call () throws Exception {return "Callable"; )
}
and
ExecutorService es = Executors.newCachedThreadPool ();
Runnable r1 = new ThreadRunner ();
Callable c1 = new ThreadCaller ();
// line n1
es.shutdown();
Which code fragment can be inserted at line n1to start r1and c1 threads?
Question 82

What is the result?
Question 83
Given the for loop construct:
for ( expr1 ; expr2 ; expr3 ) {
statement;
}
Which two statements are true?
for ( expr1 ; expr2 ; expr3 ) {
statement;
}
Which two statements are true?
Question 84
In 2015, daylight saving time in New York, USA, begins on March 8th at 2:00 AM. As a result, 2:00 AM becomes 3:00 AM.
Given the code fragment:

Which is the result?
Given the code fragment:

Which is the result?
Question 85
Given the code fragment:

Which three code fragments are valid at line n1?


Which three code fragments are valid at line n1?
