Oracle Java SE 8 Programmer II (1z0-809 Korean Version) - 1z0-809 Korean FREE EXAM DUMPS QUESTIONS & ANSWERS
주어진 코드 조각:
String str = "자바는 프로그래밍 언어입니다";
ToIntFunction<문자열> indexVal = str: : indexOf; //라인 n1
int x = indexVal.applyAsInt("자바");//라인 n2
System.out.println(x);
결과는 무엇입니까?
String str = "자바는 프로그래밍 언어입니다";
ToIntFunction<문자열> indexVal = str: : indexOf; //라인 n1
int x = indexVal.applyAsInt("자바");//라인 n2
System.out.println(x);
결과는 무엇입니까?
Correct Answer: D
Vote an answer
주어진 코드 조각:
4. void doStuff() throws ArithmeticException, NumberFormatException, Exception {
5. if (Math.random() >-1 throw new Exception ("Try again");
6. }
and
24. try {
25. doStuff ( ):
26. } catch (ArithmeticException | NumberFormatException | Exception e) {
27. System.out.println (e.getMessage()); }
28. catch (Exception e) {
29. System.out.println (e.getMessage()); }
30. }
코드에서 Try again을 인쇄할 수 있는 수정 사항은 무엇입니까?
4. void doStuff() throws ArithmeticException, NumberFormatException, Exception {
5. if (Math.random() >-1 throw new Exception ("Try again");
6. }
and
24. try {
25. doStuff ( ):
26. } catch (ArithmeticException | NumberFormatException | Exception e) {
27. System.out.println (e.getMessage()); }
28. catch (Exception e) {
29. System.out.println (e.getMessage()); }
30. }
코드에서 Try again을 인쇄할 수 있는 수정 사항은 무엇입니까?
Correct Answer: D
Vote an answer
주어진 코드 조각:
ZonedDateTime 출발 = ZonedDateTime.of(2015, 1, 15, 1, 0, 0, 0, ZoneID.of("UTC-7")); ZonedDateTime 도착 = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of("UTC-5")); 긴 시간 = ChronoUnit.HOURS. between(출발, 도착); //line n1 System.out.println("이동 시간은" + hrs + "hours"); 결과는 무엇입니까?
ZonedDateTime 출발 = ZonedDateTime.of(2015, 1, 15, 1, 0, 0, 0, ZoneID.of("UTC-7")); ZonedDateTime 도착 = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of("UTC-5")); 긴 시간 = ChronoUnit.HOURS. between(출발, 도착); //line n1 System.out.println("이동 시간은" + hrs + "hours"); 결과는 무엇입니까?
Correct Answer: A
Vote an answer
다음 코드 조각을 참고하세요.
List<String> empDetails = Arrays.asList("100, Robin, HR", "200, Mary, AdminServices","101, Peter, HR"); empDetails.stream()
.filter(s-> s.contains("r"))
.sorted()
.forEach(System.out::println); //line n1
결과는 어떻게 되나요?
List<String> empDetails = Arrays.asList("100, Robin, HR", "200, Mary, AdminServices","101, Peter, HR"); empDetails.stream()
.filter(s-> s.contains("r"))
.sorted()
.forEach(System.out::println); //line n1
결과는 어떻게 되나요?
Correct Answer: D
Vote an answer
주어진 코드 조각:

다음 중 n1번째 줄에 독립적으로 삽입하면 PEEK: Unix가 출력되는 두 개의 코드 조각은 무엇입니까?

다음 중 n1번째 줄에 독립적으로 삽입하면 PEEK: Unix가 출력되는 두 개의 코드 조각은 무엇입니까?
Correct Answer: A,D
Vote an answer
주어진:
공개 열거형 USCurrency {
PENNY (1),
NICKLE(5),
DIME (10),
QUARTER(25);
private int value;
public USCurrency(int value) {
this.value = value;
}
public int getValue() {return value;}
}
public class Coin {
public static void main (String[] args) {
USCurrency usCoin =new USCurrency.DIME;
System.out.println(usCoin.getValue()):
}
}
주어진 코드를 컴파일할 수 있는 두 가지 수정 사항은 무엇입니까? (2개를 선택하세요.)
공개 열거형 USCurrency {
PENNY (1),
NICKLE(5),
DIME (10),
QUARTER(25);
private int value;
public USCurrency(int value) {
this.value = value;
}
public int getValue() {return value;}
}
public class Coin {
public static void main (String[] args) {
USCurrency usCoin =new USCurrency.DIME;
System.out.println(usCoin.getValue()):
}
}
주어진 코드를 컴파일할 수 있는 두 가지 수정 사항은 무엇입니까? (2개를 선택하세요.)
Correct Answer: A,D
Vote an answer
주어진 코드 조각:
List<String> listVal = Arrays.asList("Joe", "Paul", "Alice", "Tom");
System.out.println (
// line n1
);
다음 중 n1번째 줄에 삽입하면 길이가 3보다 큰 문자열 요소의 개수를 출력할 수 있는 코드 조각은 무엇입니까?
List<String> listVal = Arrays.asList("Joe", "Paul", "Alice", "Tom");
System.out.println (
// line n1
);
다음 중 n1번째 줄에 삽입하면 길이가 3보다 큰 문자열 요소의 개수를 출력할 수 있는 코드 조각은 무엇입니까?
Correct Answer: C
Vote an answer
주어진:
class Book {
int id;
String name;
public Book (int id, String name) {
this.id = id;
this.name = name;
}
public boolean equals (Object obj) { //line n1
boolean output = false;
Book b = (Book) obj;
if (this.id = = b.id) {
output = true;
}
return output;
}
}
및 코드 조각:
책 b1 = 새 책(101, "자바 프로그래밍");
책 b2 = 새 책(102, "자바 프로그래밍");
System.out.println (b1.equals(b2)); //라인 n2
어떤 말이 진실이야?
class Book {
int id;
String name;
public Book (int id, String name) {
this.id = id;
this.name = name;
}
public boolean equals (Object obj) { //line n1
boolean output = false;
Book b = (Book) obj;
if (this.id = = b.id) {
output = true;
}
return output;
}
}
및 코드 조각:
책 b1 = 새 책(101, "자바 프로그래밍");
책 b2 = 새 책(102, "자바 프로그래밍");
System.out.println (b1.equals(b2)); //라인 n2
어떤 말이 진실이야?
Correct Answer: C
Vote an answer
주어진:
public class Counter {
public static void main (String[ ] args) {
int a = 10;
int b = -1;
assert (b >=1) : "Invalid Denominator";
int = a / b;
System.out.println (c);
}
}
-da 옵션을 사용하여 코드를 실행한 결과는 무엇입니까?
public class Counter {
public static void main (String[ ] args) {
int a = 10;
int b = -1;
assert (b >=1) : "Invalid Denominator";
int = a / b;
System.out.println (c);
}
}
-da 옵션을 사용하여 코드를 실행한 결과는 무엇입니까?
Correct Answer: A
Vote an answer








