1z0-809 試験問題を無料オンラインアクセス
| 試験コード: | 1z0-809 |
| 試験名称: | Java SE 8 Programmer II |
| 認定資格: | Oracle |
| 無料問題数: | 209 |
| 更新日: | 2025-12-16 |
Given the code fragment:
List<Integer> values = Arrays.asList (1, 2, 3);
values.stream ()
.map(n -> n*2)//line n1
.peek(System.out::print)//line n2
.count();
What is the result?
Given that these files exist and are accessible:
and given the code fragment:
Which code fragment can be inserted at line n1 to enable the code to print only /company/emp?
Given:
class ImageScanner implements AutoCloseable {
public void close () throws Exception {
System.out.print ("Scanner closed.");
}
public void scanImage () throws Exception {
System.out.print ("Scan.");
throw new Exception("Unable to scan.");
}
}
class ImagePrinter implements AutoCloseable {
public void close () throws Exception {
System.out.print ("Printer closed.");
}
public void printImage () {System.out.print("Print."); }
}
and this code fragment:
try (ImageScanner ir = new ImageScanner();
ImagePrinter iw = new ImagePrinter()) {
ir.scanImage();
iw.printImage();
} catch (Exception e) {
System.out.print(e.getMessage());
}
What is the result?
Given the code fragments:
and
Which two modifications enable to sort the elements of the emps list? (Choose two.)