1z0-809-KR 문제 36

주어진 코드 조각:
class CallerThread implements Callable<String> {
String str;
public CallerThread(String s) {this.str=s;}
public String call() throws Exception {
return str.concat("Call");
}
}
and
public static void main (String[] args) throws InterruptedException, ExecutionException
{
ExecutorService es = Executors.newFixedThreadPool(4); //line n1
Future f1 = es.submit (newCallerThread("Call"));
String str = f1.get().toString();
System.out.println(str);
}
어떤 말이 진실이야?

1z0-809-KR 문제 37

주어진 코드 조각:

1,2를 인쇄하기 위해 n1행에 어떤 문장을 삽입할 수 있습니까? 1,10; 2,20;?

1z0-809-KR 문제 38

/resourses/Message.properties의 내용을 고려해 보면:
welcome1="좋은 하루 보내세요!"
그리고 다음 코드 조각이 주어졌습니다:
속성 prop = new Properties ();
FileInputStream fis = new FileInputStream ("/resources/Message.properties"); prop.load(fis); System.out.println(prop.getProperty("welcome1")); System.out.println(prop.getProperty("welcome2", "Test"));//line n1 System.out.println(prop.getProperty("welcome3")); 결과는 무엇입니까?

1z0-809-KR 문제 39

주어진 코드 조각:

결과는 무엇입니까?

1z0-809-KR 문제 40

주어진 코드 조각:
List<String> nL = Arrays.asList("짐", "존", "제프");
Function<문자열, 문자열> funVal = s -> "안녕하세요 : ".contact(s);
nL.Stream()
.map(funVal)
.peek(시스템 출력::인쇄);
결과는 무엇입니까?