And you have the following code snippet:
Locale [] loc = Locale.getAvailableLocales();
Which of the following statements will print all the supported (by the JVM) French Language Locale on to the console?
Select 2 options.
1. package com.udayan.ocp;
2.
3. import java.util.stream.Stream;
4.
5. public class Test {
6. public static void main(String[] args) {
7. System.out.println(Stream.of(10, 0, -10).sorted().findAny().orElse(-1));
8. }
9. }
Which of the following statements are true about the execution of Test class?
Select 2 options.
1. package com.udayan.ocp;
2.
3. import java.util.*;
4.
5. public class Test {
6. public static void main(String[] args) {
7. NavigableMap
8. map.put(25, "Pune");
9. map.put(32, "Mumbai");
10. map.put(11, "Sri Nagar");
11. map.put(39, "Chennai");
12.
13. System.out.println(map.headMap(25, true));
14. }
15. }
//Test.java
package com.udayan.ocp;
class Player {
String name;
int age;
Player() {
this.name = "Virat";
this.age = 29;
}
public int hashCode() {
return 100;
}
}
public class Test {
public static void main(String[] args) {
System.out.println(new Player());
}
}
Hexadecimal representation of 100 is 64.
Which of the following option is correct?
© Copyrights DumpsEngine 2025. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsEngine.