Oracle Java SE 8 Programmer II (1z0-809 Korean Version) - 1z0-809 Korean Exam Practice Test
주어진 코드 조각:
LocalDate ValentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14);
LocalDate next15days = ValentinesDay.plusDays (15);
LocalDate nextYear = next15days.plusYears(1); // 라인 n1
System.out.println(내년);
결과는 무엇입니까?
LocalDate ValentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14);
LocalDate next15days = ValentinesDay.plusDays (15);
LocalDate nextYear = next15days.plusYears(1); // 라인 n1
System.out.println(내년);
결과는 무엇입니까?
Correct Answer: B
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: B,C
Vote an answer
주어진 코드 조각:
List<정수> list1 = Arrays.asList(10, 20);
List<정수> list2 = Arrays.asList(15, 30);
//라인 n1
다음 중 n1행에 삽입하면 10 20 15 30이 출력되는 코드 조각은 무엇입니까?
List<정수> list1 = Arrays.asList(10, 20);
List<정수> list2 = Arrays.asList(15, 30);
//라인 n1
다음 중 n1행에 삽입하면 10 20 15 30이 출력되는 코드 조각은 무엇입니까?
Correct Answer: D
Vote an answer
Country 클래스의 정의가 주어지면:
공공 계급 국가 {
public enum Continent {아시아, 유럽}
문자열 이름;
대륙 지역;
공개 국가(문자열 na, 대륙 등록) {
이름 = na, 지역 = reg;
}
공개 문자열 getName() {반환 이름;}
공개 대륙 getRegion() {반환 지역;}
}
및 코드 조각:
목록<국가> couList = Arrays.asList(
새 국가("일본", Country.Continent.ASIA),
새 국가("이탈리아", Country.Continent.EUROPE),
새로운 국가("독일", Country.Continent.EUROPE));
지도<국가.대륙, 목록<문자열>> regionNames = couList.stream()
.collect(Collectors.groupingBy (국가 :: getRegion,
Collectors.mapping(국가::getName, Collectors.toList()))));
System.out.println(지역이름);
출력은 무엇입니까?
공공 계급 국가 {
public enum Continent {아시아, 유럽}
문자열 이름;
대륙 지역;
공개 국가(문자열 na, 대륙 등록) {
이름 = na, 지역 = reg;
}
공개 문자열 getName() {반환 이름;}
공개 대륙 getRegion() {반환 지역;}
}
및 코드 조각:
목록<국가> couList = Arrays.asList(
새 국가("일본", Country.Continent.ASIA),
새 국가("이탈리아", Country.Continent.EUROPE),
새로운 국가("독일", Country.Continent.EUROPE));
지도<국가.대륙, 목록<문자열>> regionNames = couList.stream()
.collect(Collectors.groupingBy (국가 :: getRegion,
Collectors.mapping(국가::getName, Collectors.toList()))));
System.out.println(지역이름);
출력은 무엇입니까?
Correct Answer: C
Vote an answer
주어진 코드 조각:
클래스 MyThread 구현 Runnable {
private static AtomicInteger count = new AtomicInteger (0);
public void run () {
int x = count.incrementAndGet();
System.out.print (x+" ");
}
}
and
Thread thread1 = new Thread(new MyThread());
Thread thread2 = new Thread(new MyThread());
Thread thread3 = new Thread(new MyThread());
Thread [] ta = {thread1, thread2, thread3};
for (int x= 0; x < 3; x++) {
ta[x].start();
}
어떤 말이 진실이야?
클래스 MyThread 구현 Runnable {
private static AtomicInteger count = new AtomicInteger (0);
public void run () {
int x = count.incrementAndGet();
System.out.print (x+" ");
}
}
and
Thread thread1 = new Thread(new MyThread());
Thread thread2 = new Thread(new MyThread());
Thread thread3 = new Thread(new MyThread());
Thread [] ta = {thread1, thread2, thread3};
for (int x= 0; x < 3; x++) {
ta[x].start();
}
어떤 말이 진실이야?
Correct Answer: D
Vote an answer
java.util.stream.Stream 인터페이스에서 어떤 두 가지 방법이 축소 작업을 수행합니까? (2개를 선택하세요.)
Correct Answer: B,C
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
이러한 파일이 존재하고 액세스할 수 있는 경우:

코드 조각이 주어지면 :

코드가 /company/emp만 인쇄할 수 있도록 하기 위해 n1행에 어떤 코드 조각을 삽입할 수 있습니까?

코드 조각이 주어지면 :

코드가 /company/emp만 인쇄할 수 있도록 하기 위해 n1행에 어떤 코드 조각을 삽입할 수 있습니까?
Correct Answer: B
Vote an answer
Student 테이블의 구조가 주어졌을 때:
학생(ID INTEGER, 이름 VARCHAR)
STUDENT 테이블의 레코드가 주어지면:

주어진 코드 조각:

다음과 같이 가정합니다.
결과는 무엇입니까?
학생(ID INTEGER, 이름 VARCHAR)
STUDENT 테이블의 레코드가 주어지면:

주어진 코드 조각:

다음과 같이 가정합니다.
결과는 무엇입니까?
Correct Answer: B
Vote an answer
주어진 코드 조각:
class Employee {
Optional<Address> address;
Employee (Optional<Address> address) {
this.address = address;
}
public Optional<Address> getAddress() { return address; }
}
class Address {
String city = "New York";
public String getCity { return city: }
public String toString() {
return city;
}
}
그리고
주소 주소 = null;
Optional<Address> addrs1 = Optional.ofNullable(주소);
직원 e1 = 새 직원(addrs1);
문자열 eAddress = (addrs1.isPresent()) ? addrs1.get().getCity() : "사용할 수 없는 도시"; 결과는 무엇입니까?
class Employee {
Optional<Address> address;
Employee (Optional<Address> address) {
this.address = address;
}
public Optional<Address> getAddress() { return address; }
}
class Address {
String city = "New York";
public String getCity { return city: }
public String toString() {
return city;
}
}
그리고
주소 주소 = null;
Optional<Address> addrs1 = Optional.ofNullable(주소);
직원 e1 = 새 직원(addrs1);
문자열 eAddress = (addrs1.isPresent()) ? addrs1.get().getCity() : "사용할 수 없는 도시"; 결과는 무엇입니까?
Correct Answer: D
Vote an answer