Exam Name: | Java SE 21 Developer Professional | ||
Exam Code: | 1z0-830 Dumps | ||
Vendor: | Oracle | Certification: | Java SE |
Questions: | 84 Q&A's | Shared By: | gia |
Given:
java
StringBuilder result = Stream.of("a", "b")
.collect(
() -> new StringBuilder("c"),
StringBuilder::append,
(a, b) -> b.append(a)
);
System.out.println(result);
What is the output of the given code fragment?
Given:
java
double amount = 42_000.00;
NumberFormat format = NumberFormat.getCompactNumberInstance(Locale.FRANCE, NumberFormat.Style.SHORT);
System.out.println(format.format(amount));
What is the output?
Given:
java
String colors = "red\n" +
"green\n" +
"blue\n";
Which text block can replace the above code?
Given:
java
Integer frenchRevolution = 1789;
Object o1 = new String("1789");
Object o2 = frenchRevolution;
frenchRevolution = null;
Object o3 = o2.toString();
System.out.println(o1.equals(o3));
What is printed?