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 8 of 13.
- Question 100: Given the definition of the Emp class: public class Emp private String eName; private Integer eAge; Emp(String eN, Integer eA) { this.eName = eN; this.eAge = e…
- Question 101: Given: class Vehicle implements Comparable<Vehicle>{ int vno; String name; public Vehicle (int vno, String name) { this.vno = vno,; this.name = name; } public…
- Question 102: Given that course.txt is accessible and contains: Course : : Java - and given the code fragment: public static void main (String[ ] args) { int i; char c; try…
- Question 103: Given the code fragment: Path file = Paths.get ("courses.txt"); // line n1 Assume the courses.txt is accessible. Which code fragment can be inserted at line n1…
- Question 104: Given the code fragment: Stream<Path> files = Files.list(Paths.get(System.getProperty("user.home"))); files.forEach (fName -> { //line n1 try { Path aPath = fN…
- Question 105: Given the code fragment: BiFunction<Integer, Double, Integer> val = (t1, t2) -> t1 + t2; //line n1 //line n2 System.out.println(val.apply(10, 10.5)); What is t…
- Question 106: Given: class Student { String course, name, city; public Student (String name, String course, String city) { this.course = course; this.name = name; this.city…
- Question 107: Given the code fragments: class Employee { Optional<Address> address; Employee (Optional<Address> address) { this.address = address; } public Optional<Address>…
- Question 108: Given the code fragment: public void recDelete (String dirName) throws IOException { File [ ] listOfFiles = new File (dirName) .listFiles(); if (listOfFiles !…
- Question 113: Given the code fragment: Path path1 = Paths.get("/app/./sys/"); Path res1 = path1.resolve("log"); Path path2 = Paths.get("/server/exe/"); Path res2 = path2.res…