Given:

What action ensures successful compilation?
A. Replace public Color(int c) with private Color(int c).
B. Replace int c; with private int c;.
C. Replace int c; with private final int c;.
D. Replace enum Color implements Serializable with public enum Color.
E. Replace enum Color with public enum Color.
Given:

Which is true?
A. System.out is the standard output stream. The stream is open only when System.out is called.
B. System.in cannot reassign the other stream.
C. System.out is an instance of java.io.OutputStream by default.
D. System.in is the standard input stream. The stream is already open.
Given: String originalPath = "data\\projects\\a-project\\..\\..\\another-project"; Path path = Paths.get(originalPath); System.out.print(path.normalize());
What is the result?
A. data\another-project
B. data\projects\a-project\another-project
C. data\\projects\\a-project\\..\\..\\another-project
D. data\projects\a-project\..\..\another-project

Which is a proper JDBC URL?
A. jdbe.mysql.com://localhost:3306/database
B. http://localhost.mysql.com:3306/database
C. http://localhost mysql.jdbc:3306/database
D. jdbc:mysql://localhost:3306/database
Given:

When is the readObject method called?
A. before this object is deserialized
B. after this object is deserialized
C. before this object Is serialized
D. The method is never called.
E. after this object is serialized
Given the Person class with age and name along with getter and setter methods, and this code fragment:

What will be the result?
A. Aman Tom Peter
B. Tom Aman Peter
C. Aman Peter Tom
D. Tom Peter Aman
A bookstore's sales are represented by a list of Sale objects populated with the name of the customer and
the books they purchased.
public class Sale {
private String customer;
private List
// constructor, setters and getters not shown
}
public class Book {
private String name;
private double price;
// constructor, setters and getters not shown
}
Given a list of Sale objects, tList, which code fragment creates a list of total sales for each customer in
ascending order?

A. Option A
B. Option B
C. Option C
D. Option D
Given:

What is the result?
A. Orange Juice
B. The compilation fails.
C. Orange Juice Apple Pie Lemmon Ice Raspberry Tart
D. The program prints nothing.
Given:
LocalDate d1 = LocalDate.of(1997,2,7); DateTimeFormatter dtf = DateTimeFormatter.ofPattern( /*insert code here*/ ); System.out.println(dtf.format (d1)); Which pattern formats the date as Friday 7th of February 1997?
A. "eeee dd+"th of"+ MMM yyyy"
B. "eeee dd'th of' MMM yyyy"
C. "eeee d+"th of"+ MMMM yyyy"
D. "eeee d'th of' MMMM yyyy"
Given the code fragment:
Path source = Paths.get("/repo/a/a.txt"); Path destination = Paths.get("/repo"); Files.move(source, destination); // line 1 Files.delete (source); // line 2
Assuming the source file and destination folder exist, what Is the result?
A. A java.nio.file.FileAlreadyExistsException is thrown on line 1.
B. A java.nio.file.NoSuchFileException is thrown on line 2.
C. A copy of /repo/a/a.txt is moved to the /repo directory and /repo/a/a.txt is deleted.
D. a.txt is renamed repo.