1z0-809 無料問題集「Oracle Java SE 8 Programmer II」

Given the code fragment:

Which should be inserted into line n1 to print Average = 2.5?

Given the code fragment:
Path path1 = Paths.get("/app/./sys/");
Path res1 = path1.resolve("log");
Path path2 = Paths.get("/server/exe/");
Path res1 = path2.resolve("/readme/");
System.out.println(res1);
System.out.println(res2);
What is the result?

Given the code fragment:
List<String> str = Arrays.asList ("my", "pen", "is", "your', "pen");
Predicate<String> test = s -> {
int i = 0;
boolean result = s.contains ("pen");
System.out.print(i++) + ":");
return result;
};
str.stream()
.filter(test)
.findFirst()
.ifPresent(System.out ::print);
What is the result?

Given the definition of the Vehicle class:
class Vehicle {
String name;
void setName (String name) {
this.name = name;
}
String getName() {
return name;
}
}
Which action encapsulates the Vehicle class?

Given:
Book.java:
public class Book {
private String read(String bname) { return "Read" + bname }
}
EBook.java:
public class EBook extends Book {
public class String read (String url) { return "View" + url }
}
Test.java:
public class Test {
public static void main (String[] args) {
Book b1 = new Book();
b1.read("Java Programing");
Book b2 = new EBook();
b2.read("http://ebook.com/ebook");
}
}
What is the result?

Given that data.txt and alldata.txt are accessible, and the code fragment:

What is required at line n1 to enable the code to overwrite alldata.txt with data.txt?

Given the code fragments:

and

Which two modifications enable to sort the elements of the emps list? (Choose two.)

正解:A、B 解答を投票する
Given the code fragment:
Stream<Path> files = Files.list(Paths.get(System.getProperty("user.home"))); files.forEach (fName -> {//line n1 try { Path aPath = fName.toAbsolutePath();//line n2 System.out.println(fName + ":"
+ Files.readAttributes(aPath, Basic.File.Attributes.class).creationTime ());
} catch (IOException ex) {
ex.printStackTrace();
});
What is the result?

Given the code fragment:
List<String> colors = Arrays.asList("red", "green", "yellow");
Predicate<String> test = n - > {
System.out.println("Searching...");
return n.contains("red");
};
colors.stream()
.filter(c -> c.length() > 3)
.allMatch(test);
What is the result?

Given the code fragment:

Which code fragment, when inserted at line 7, enables printing 100?

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡