1z1-830試験無料問題集「Oracle Java SE 21 Developer Professional 認定」

Given a properties file on the classpath named Person.properties with the content:
ini
name=James
And:
java
public class Person extends ListResourceBundle {
protected Object[][] getContents() {
return new Object[][]{
{"name", "Jeanne"}
};
}
}
And:
java
public class Test {
public static void main(String[] args) {
ResourceBundle bundle = ResourceBundle.getBundle("Person");
String name = bundle.getString("name");
System.out.println(name);
}
}
What is the given program's output?

解説: (GoShiken メンバーにのみ表示されます)
Which of the followingisn'ta correct way to write a string to a file?

解説: (GoShiken メンバーにのみ表示されます)
Given:
java
System.out.print(Boolean.logicalAnd(1 == 1, 2 < 1));
System.out.print(Boolean.logicalOr(1 == 1, 2 < 1));
System.out.print(Boolean.logicalXor(1 == 1, 2 < 1));
What is printed?

解説: (GoShiken メンバーにのみ表示されます)
Which of the following doesnotexist?

解説: (GoShiken メンバーにのみ表示されます)
Which of the following methods of java.util.function.Predicate aredefault methods?

正解:C,E,F 解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
Given:
java
Object myVar = 0;
String print = switch (myVar) {
case int i -> "integer";
case long l -> "long";
case String s -> "string";
default -> "";
};
System.out.println(print);
What is printed?

解説: (GoShiken メンバーにのみ表示されます)
Given:
java
var ceo = new HashMap<>();
ceo.put("Sundar Pichai", "Google");
ceo.put("Tim Cook", "Apple");
ceo.put("Mark Zuckerberg", "Meta");
ceo.put("Andy Jassy", "Amazon");
Does the code compile?

解説: (GoShiken メンバーにのみ表示されます)
Given:
java
public class ExceptionPropagation {
public static void main(String[] args) {
try {
thrower();
System.out.print("Dom Perignon, ");
} catch (Exception e) {
System.out.print("Chablis, ");
} finally {
System.out.print("Saint-Emilion");
}
}
static int thrower() {
try {
int i = 0;
return i / i;
} catch (NumberFormatException e) {
System.out.print("Rose");
return -1;
} finally {
System.out.print("Beaujolais Nouveau, ");
}
}
}
What is printed?

解説: (GoShiken メンバーにのみ表示されます)