Given the code fragment: Map<Integer, String> books = new TreeMap<>(); books.put (1007, “A”); books.put (1002, “C”); books.put (1001, “B”); books.put (1003, “B”); System.out.println (books); What is the result? A. {1007 = A, 1002 = C, 1001 = B, 1003 =…

Given: and the code fragment: Book b1 = new Book (101, “Java Programing”); Book b2 = new Book (102, “Java Programing”); System.out.println (b1.equals(b2)); //line n2 Which statement is true? A. The program prints true. B. The program prints false. C.…

Given the content of /resourses/Message.properties: welcome1=”Good day!” and given the code fragment: Properties prop = new Properties (); FileInputStream fis = new FileInputStream (“/resources/Message.properties”); prop.load(fis); System.out.println(prop.getProperty(“welcome1”)); System.out.println(prop.getProperty(“welcome2”, “Test”));//line n1 System.out.println(prop.getProperty(“welcome3”)); What is the result? A. Good day! Test followed by…

Given the code fragment: Path p1 = Paths.get(“/Pics/MyPic.jpeg”); System.out.println (p1.getNameCount() + : + p1.getName(1) + : + p1.getFileName()); Assume that the Pics directory does NOT exist. What is the result? A. An exception is thrown at run time. B. 2:MyPic.jpeg:…

Given the code fragment: Assume that Projects contains subdirectories that contain .class files and is passed as an argument to the recDelete () method when it is invoked. What is the result? A. The method deletes all the .class files…