1z0-809-KR 문제 11
주어진 코드 조각:

결과는 무엇입니까?

결과는 무엇입니까?
1z0-809-KR 문제 12
이러한 파일이 존재하고 액세스할 수 있는 경우:
/스포츠/정보.txt
/sports/cricket/players.txt
/sports/cricket/data/ODI.txt
코드 조각이 주어지면 :
정수 최대 깊이 = 2;
스트림<경로> 경로 = Files.find(Paths.get("/스포츠"),
최대 깊이,
(p, a) -> p.getFileName().toString().endsWith("txt"),
FileVisitOption.FOLLOW_LINKS);
긴 fCount = 경로.count();
System.out.println(fCount);
디렉토리 구조의 파일에 대한 소프트 링크/심볼릭 링크가 없다고 가정하면 결과는 무엇입니까?
/스포츠/정보.txt
/sports/cricket/players.txt
/sports/cricket/data/ODI.txt
코드 조각이 주어지면 :
정수 최대 깊이 = 2;
스트림<경로> 경로 = Files.find(Paths.get("/스포츠"),
최대 깊이,
(p, a) -> p.getFileName().toString().endsWith("txt"),
FileVisitOption.FOLLOW_LINKS);
긴 fCount = 경로.count();
System.out.println(fCount);
디렉토리 구조의 파일에 대한 소프트 링크/심볼릭 링크가 없다고 가정하면 결과는 무엇입니까?
1z0-809-KR 문제 13
주어진 코드 조각:

결과는 무엇입니까?

결과는 무엇입니까?
1z0-809-KR 문제 14
주어진 코드 조각:
클래스 호출자는 Callable<String> {을 구현합니다.
문자열 str;
공개 호출자(문자열 s) {this.str=s;}
공개 문자열 call() 예외 발생 { return str.concat("호출자");}
}
클래스 러너는 Runnable {을 구현합니다.
문자열 str;
공개 러너(문자열 s) {this.str=s;}
공개 무효 실행() { System.out.println(str.concat("실행자"));}
}
그리고
public static void main(String[] args)는 InterruptedException, ExecutionException을 던집니다. { ExecutorService es = Executors.newFixedThreadPool(2); 미래 f1 = es.submit(새 발신자("호출")); 미래 f2 = es.submit(새로운 러너("실행")); 문자열 str1 = (문자열) f1.get(); 문자열 str2 = (문자열) f2.get();//라인 n1 System.out.println(str1+ ":" + str2);
}
결과는 무엇입니까?
클래스 호출자는 Callable<String> {을 구현합니다.
문자열 str;
공개 호출자(문자열 s) {this.str=s;}
공개 문자열 call() 예외 발생 { return str.concat("호출자");}
}
클래스 러너는 Runnable {을 구현합니다.
문자열 str;
공개 러너(문자열 s) {this.str=s;}
공개 무효 실행() { System.out.println(str.concat("실행자"));}
}
그리고
public static void main(String[] args)는 InterruptedException, ExecutionException을 던집니다. { ExecutorService es = Executors.newFixedThreadPool(2); 미래 f1 = es.submit(새 발신자("호출")); 미래 f2 = es.submit(새로운 러너("실행")); 문자열 str1 = (문자열) f1.get(); 문자열 str2 = (문자열) f2.get();//라인 n1 System.out.println(str1+ ":" + str2);
}
결과는 무엇입니까?
1z0-809-KR 문제 15
주어진:
final class Folder {//line n1
//line n2
public void open () {
System.out.print("Open");
}
}
public class Test {
public static void main (String [] args) throws Exception {
try (Folder f = new Folder()) {
f.open();
}
}
}
코드에서 Open Close를 인쇄할 수 있도록 하는 두 가지 수정 사항은 무엇입니까? (2개를 선택하세요.)
final class Folder {//line n1
//line n2
public void open () {
System.out.print("Open");
}
}
public class Test {
public static void main (String [] args) throws Exception {
try (Folder f = new Folder()) {
f.open();
}
}
}
코드에서 Open Close를 인쇄할 수 있도록 하는 두 가지 수정 사항은 무엇입니까? (2개를 선택하세요.)
