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

A module com.eiffeltower.shop with the related sources in the src directory.
That module requires com.eiffeltower.membership, available in a JAR located in the lib directory.
What is the command to compile the module com.eiffeltower.shop?

解説: (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 メンバーにのみ表示されます)
Which of the following statements oflocal variables declared with varareinvalid?(Choose 4)

正解:A,D,E,F 解答を投票する
解説: (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 メンバーにのみ表示されます)
Given:
java
Stream<String> strings = Stream.of("United", "States");
BinaryOperator<String> operator = (s1, s2) -> s1.concat(s2.toUpperCase()); String result = strings.reduce("-", operator); System.out.println(result); What is the output of this code fragment?

解説: (GoShiken メンバーにのみ表示されます)
Given:
java
List<String> frenchAuthors = new ArrayList<>();
frenchAuthors.add("Victor Hugo");
frenchAuthors.add("Gustave Flaubert");
Which compiles?

正解:A,B,E 解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
Given:
java
String colors = "red\n" +
"green\n" +
"blue\n";
Which text block can replace the above code?

解説: (GoShiken メンバーにのみ表示されます)
Given:
java
public class BoomBoom implements AutoCloseable {
public static void main(String[] args) {
try (BoomBoom boomBoom = new BoomBoom()) {
System.out.print("bim ");
throw new Exception();
} catch (Exception e) {
System.out.print("boom ");
}
}
@Override
public void close() throws Exception {
System.out.print("bam ");
throw new RuntimeException();
}
}
What is printed?

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

正解:C,E,F 解答を投票する
解説: (GoShiken メンバーにのみ表示されます)