Oracle Java SE 21 Developer Professional 認定 1z0-830 試験問題:
1. What is the output of the following snippet? (Assume the file exists)
java
Path path = Paths.get("C:\\home\\joe\\foo");
System.out.println(path.getName(0));
A) IllegalArgumentException
B) C
C) Compilation error
D) home
E) C:
2. Given:
java
Map<String, Integer> map = Map.of("b", 1, "a", 3, "c", 2);
TreeMap<String, Integer> treeMap = new TreeMap<>(map);
System.out.println(treeMap);
What is the output of the given code fragment?
A) Compilation fails
B) {b=1, c=2, a=3}
C) {c=1, b=2, a=3}
D) {a=3, b=1, c=2}
E) {b=1, a=3, c=2}
F) {a=1, b=2, c=3}
G) {c=2, a=3, b=1}
3. Given:
java
LocalDate localDate = LocalDate.of(2020, 8, 8);
Date date = java.sql.Date.valueOf(localDate);
DateFormat formatter = new SimpleDateFormat(/* pattern */);
String output = formatter.format(date);
System.out.println(output);
It's known that the given code prints out "August 08".
Which of the following should be inserted as the pattern?
A) MM dd
B) MMMM dd
C) MMM dd
D) MM d
4. Given:
java
package vehicule.parent;
public class Car {
protected String brand = "Peugeot";
}
and
java
package vehicule.child;
import vehicule.parent.Car;
public class MiniVan extends Car {
public static void main(String[] args) {
Car car = new Car();
car.brand = "Peugeot 807";
System.out.println(car.brand);
}
}
What is printed?
A) Peugeot
B) An exception is thrown at runtime.
C) Compilation fails.
D) Peugeot 807
5. Given:
java
Optional o1 = Optional.empty();
Optional o2 = Optional.of(1);
Optional o3 = Stream.of(o1, o2)
.filter(Optional::isPresent)
.findAny()
.flatMap(o -> o);
System.out.println(o3.orElse(2));
What is the given code fragment's output?
A) Optional.empty
B) 1
C) Compilation fails
D) 2
E) Optional[1]
F) 0
G) An exception is thrown
質問と回答:
| 質問 # 1 正解: D | 質問 # 2 正解: D | 質問 # 3 正解: B | 質問 # 4 正解: C | 質問 # 5 正解: B |














1029 お客様のコメント
品質保証JPexamはIT認定試験のシラバスに従って、試験問題の範囲を正確に絞って、的中率が99%の最新問題集を捧げます。
1年間の無料更新サービスJPexamは1年以内に問題集の無料更新サービスを提供し、お客様がいつでも最新版の問題集を持つことを保証いたします。もし試験の内容が変更されたら、弊社は直ちにお客様にお知らせします。それに、弊社の問題集が更新されたら、早速メールで最新バージョンを送付いたします。
全額返金JPexamの問題集を利用すると、短時間で勉強しても試験に合格できるのを保証いたします。試験に不合格になってしまった場合、弊社は全額返金いたします。(
ご購入前のお試しJPexamは問題集のサンプルを無料で提供いたします。ご購入前にサンプルを試用して製品の品質を確認することができます。ご遠慮なく利用してください。
