1z0-809 Korean試験無料問題集「Oracle Java SE 8 Programmer II (1z0-809 Korean Version) 認定」
주어진:
public class Customer {
private String fName;
private String lName;
private static int count;
public customer (String first, String last) {fName = first, lName = last;
++count;}
static { count = 0; }
public static int getCount() {return count; }
}
public class App {
public static void main (String [] args) {
Customer c1 = new Customer("Larry", "Smith");
Customer c2 = new Customer("Pedro", "Gonzales");
Customer c3 = new Customer("Penny", "Jones");
Customer c4 = new Customer("Lars", "Svenson");
c4 = null;
c3 = c2;
System.out.println (Customer.getCount());
}
}
결과는 무엇입니까?
public class Customer {
private String fName;
private String lName;
private static int count;
public customer (String first, String last) {fName = first, lName = last;
++count;}
static { count = 0; }
public static int getCount() {return count; }
}
public class App {
public static void main (String [] args) {
Customer c1 = new Customer("Larry", "Smith");
Customer c2 = new Customer("Pedro", "Gonzales");
Customer c3 = new Customer("Penny", "Jones");
Customer c4 = new Customer("Lars", "Svenson");
c4 = null;
c3 = c2;
System.out.println (Customer.getCount());
}
}
결과는 무엇입니까?
正解:B
解答を投票する
주어진:
class Bird {
public void fly () { System.out.print("Can fly"); }
}
class Penguin extends Bird {
public void fly () { System.out.print("Cannot fly"); }
}
and the code fragment:
class Birdie {
public static void main (String [ ] args) {
fly( ( ) -> new Bird ( ));
fly (Penguin : : new);
}
/* line n1 */
}
다음 중 n1번째 줄에 삽입하면 Birdie 클래스를 컴파일할 수 있는 코드 조각은 무엇입니까?
class Bird {
public void fly () { System.out.print("Can fly"); }
}
class Penguin extends Bird {
public void fly () { System.out.print("Cannot fly"); }
}
and the code fragment:
class Birdie {
public static void main (String [ ] args) {
fly( ( ) -> new Bird ( ));
fly (Penguin : : new);
}
/* line n1 */
}
다음 중 n1번째 줄에 삽입하면 Birdie 클래스를 컴파일할 수 있는 코드 조각은 무엇입니까?
正解:C
解答を投票する
주어진 코드 조각:
Stream<List<String>> iStr= Stream.of (
Arrays.asList ("1", "John"),
Arrays.asList ("2", null)0;
Stream<<String> nInSt = iStr.flatMapToInt ((x) -> x.stream ());
nInSt.forEach (System.out :: print);
반환 결과;
};
str.stream()
.필터(테스트)
.findFirst()
.ifPresent(System.out :: 인쇄);
결과는 무엇입니까?
Stream<List<String>> iStr= Stream.of (
Arrays.asList ("1", "John"),
Arrays.asList ("2", null)0;
Stream<<String> nInSt = iStr.flatMapToInt ((x) -> x.stream ());
nInSt.forEach (System.out :: print);
반환 결과;
};
str.stream()
.필터(테스트)
.findFirst()
.ifPresent(System.out :: 인쇄);
결과는 무엇입니까?
正解:A
解答を投票する
주어진 코드 조각:
public static void main(String[] args) IOException을 던짐 {
BufferedReader brCopy = null;
try (BufferedReader br = new BufferedReader (new FileReader("employee.txt"))) { // 라인 n1 br.lines().forEach(c -> System.out.println(c)); br카피 = br;//n2행
}
brCopy.ready(); //라인 n3;
}
닫힌 BufferedReader에서 호출될 때 BufferedReader의 준비 메서드가 예외를 throw하고 employee.txt에 액세스할 수 있고 유효한 텍스트가 포함되어 있다고 가정합니다.
결과는 무엇입니까?
public static void main(String[] args) IOException을 던짐 {
BufferedReader brCopy = null;
try (BufferedReader br = new BufferedReader (new FileReader("employee.txt"))) { // 라인 n1 br.lines().forEach(c -> System.out.println(c)); br카피 = br;//n2행
}
brCopy.ready(); //라인 n3;
}
닫힌 BufferedReader에서 호출될 때 BufferedReader의 준비 메서드가 예외를 throw하고 employee.txt에 액세스할 수 있고 유효한 텍스트가 포함되어 있다고 가정합니다.
결과는 무엇입니까?
正解:D
解答を投票する








