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 7 of 13.
- Question 83: Given the code fragment: LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14); LocalDate next15days = valentinesDay.plusDays (15); LocalDate nextYea…
- Question 84: Given the code fragments: class Caller implements Callable<String> { String str; public Caller (String s) {this.str=s;} public String call()throws Exception {…
- Question 85: Given the code fragment: ZonedDateTime depart = ZonedDateTime.of(2015, 1, 15, 1, 0, 0, 0, ZoneID.of("UTC-7")); ZonedDateTime arrive = ZonedDateTime.of(2015, 1,…
- Question 87: Given the code fragments: interface CourseFilter extends Predicate<String> { public default boolean test (String str) { return str.contains ("Java"); } } and L…
- Question 90: Assume customers.txt is accessible and contains multiple lines. Which code fragment prints the contents of the customers.txt file?
- Question 95: 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.…
- Question 96: Given: Item table - "¢ ID, INTEGER: PK "¢ DESCRIP, VARCHAR(100) "¢ PRICE, REAL "¢ QUANTITY< INTEGER And given the code fragment: 9. try { 10. Connection conn =…
- Question 97: Given the code fragment: Map<Integer, String> books = new TreeMap<>(); books.put (1007, "A"); books.put (1002, "C"); books.put (1003, "B"); books.put (1003, "B…
- Question 98: Given the code fragment: Path path1 = Paths.get("/app/./sys/"); Path res1 = path1.resolve("log"); Path path2 = Paths.get("/server/exe/"); Path res1 = path2.res…
- Question 99: Given the code fragment: List<String> nL = Arrays.asList("Jim", "John", "Jeff"); Function<String, String> funVal = s -> "Hello : ".concat(s); nL.Stream() .map(…