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

Given:
interface Doable {
public void doSomething (String s);
}
Which two class definitions compile? (Choose two.)

正解:A、E 解答を投票する
Given:
public class product {
int id; int price;
public Product (int id, int price) {
this.id = id;
this.price = price;
}
public String toString() { return id + ":" + price; }
}
and the code fragment:
List<Product> products = Arrays.asList(new Product(1, 10),
new Product (2, 30),
new Product (2, 30));
Product p = products.stream().reduce(new Product (4, 0), (p1, p2) -> {
p1.price+=p2.price;
return new Product (p1.id, p1.price);});
products.add(p);
products.stream().parallel()
.reduce((p1, p2) - > p1.price > p2.price ? p1 : p2)
.ifPresent(System.out: :println);
What is the result?

Given:

What is the result?

Given the code fragment:

Which modification enables the code to print Price 5 New Price 4?

Which two statements are true about synchronization and locks? (Choose two.)

正解:B、C 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
Given:
interface Rideable {Car getCar (String name); }
class Car {
private String name;
public Car (String name) {
this.name = name;
}
}
Which code fragment creates an instance of Car?

Given:

Which two interfaces can you use to create lambda expressions? (Choose two.)

正解:B、E 解答を投票する
Which statement is true about java.time.Duration?

解説: (JPNTest メンバーにのみ表示されます)
Given records from the Player table:

and given the code fragment:
try {
Connection conn = DriverManager.getConnection(URL, username, password); Statement st= conn.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); st.execute ("SELECT * FROM Player"); st.setMaxRows(2); ResultSet rs = st.getResultSet(); rs.absolute(3); while (rs.next ()) { System.out.println(rs.getInt(1) + " " + rs.getString(2));
}
} catch (SQLException ex) {
System.out.print("SQLException is thrown.");
}
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with URL, username, and password.
The SQL query is valid.
What is the result?

Given the code fragment:
UnaryOperator<Double> uo1 = s -> s*2;//line n1
List<Double> loanValues = Arrays.asList(1000.0, 2000.0);
loanValues.stream()
.filter(lv -> lv >= 1500)
.map(lv -> uo1.apply(lv))//line n2
.forEach(s -> System.out.print(s + " "));
What is the result?

Given the code fragment:

What is the result?

You have been asked to create a ResourceBundle which uses a properties file to localize an application.
Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu?

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

Given the code fragment:

Assume that dbURL, userName, and password are valid.
Which code fragment can be inserted at line n1 to enable the code to print Connection Established?

弊社を連絡する

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

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

サポート:現在連絡