Java SE 8 Programmer II Free Practice Exam Questions
122 real Java SE 8 Programmer II exam questions with answers and AI explanations. Oracle certification prep — page 1 of 13.
- Question 1: Given the code fragment: public class Foo { public static void main (String [ ] args) { Map<Integer, String> unsortMap = new HashMap< > ( ); unsortMap.put (10,…
- Question 2: Given the definition of the Vehicle class: Class Vehhicle { int distance; //line n1 Vehicle (int x) { this distance = x; } public void increSpeed(int time) { /…
- Question 3: Given the code fragment: Path source = Paths.get ("/data/december/log.txt"); Path destination = Paths.get("/data"); Files.copy (source, destination); /data/dec…
- Question 4: Given: public class Counter { public static void main (String[ ] args) { int a = 10; int b = -1; assert (b >=1) : "Invalid Denominator"; int = a / b; System.ou…
- Question 5: Given the code fragment: BiFunction<Integer, Double, Integer> val = (t1, t2) -> t1 + t2; //line n1 System.out.println(val.apply(10, 10.5)); What is the result?
- Question 6: java.time.Duration? Which statement is true about -
- Question 7: Given the code fragment: List<Integer> list1 = Arrays.asList(10, 20); List<Integer> list2 = Arrays.asList(15, 30); //line n1 Which code fragment, when inserted…
- Question 8: Given the code fragment: public static void main (String[] args) throws IOException { BufferedReader brCopy = null; try (BufferedReader br = new BufferedReader…
- Question 9: Given: Book.java: public class Book { private String read(String bname) { return "Read" + bname } } EBook.java: public class EBook extends Book { public class…
- Question 10: Given the code fragment: LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14); LocalDate nextYear = valentinesDay.plusYears(1); nextYear.plusDays(15…