Given this enum declaration:

Examine this code:
System.out.println(Alphabet.getFirstLetter());
What code should be written at line 3 to make this code print A?
A. final String getFirstLetter() { return A.toString(); }
B. static String getFirstLetter() { return Alphabet.values()[1].toString(); }
C. static String getFirstLetter() { return A.toString(); }
D. String getFirstLetter() { return A.toString(); }
Given: Which one is correct?

A. An IllegalThreadStateException is thrown at run time.
B. Three threads are created.
C. The compilation fails.
D. Four threads are created.
Given:

What code must you insert on Line 1 to enable the code to print Hello world?
A. Hello.Greeting myG = new Hello.Greeting() myG.sayHi();
B. Hello myH = new Hello(); Hello.Greeting myG = myH.new Greeting(); myG.sayHi();
C. Hello myH = new Hello(); Hello.Greeting myG = myH.new Hello.Greeting(); myG.sayHi();
D. Hello myH = new Hello(); Greeting myG = new Greeting(); myG.sayHi ();
Given:

You want to use the myResource class in a try-with-resources statement. Which change will accomplish this?
A. Extend AutoCloseable and override the close method.
B. Implement AutoCloseable and override the autoClose method.
C. Extend AutoCloseable and override the autoClose method.
D. Implement AutoCloseable and override the close method.
Given: Which option should you choose to enable the code to print Something happened?

A. Add extends GeneralException on line 1. Add extends Exception on line 2.
B. Add extends SpecificException on line 1. Add extends GeneralException on line 2.
C. Add extends Exception on line 1. Add extends Exception on line 2.
D. Add extends Exception on line 1. Add extends GeneralException on line 2.
Given: When run and all three files exist, what is the state of each reader on Line 1?

A. All three readers are still open.
B. All three readers have been closed.
C. The compilation fails.
D. Only reader1 has been closed.
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.
Which interface in the java.util.function package can return a primitive type?
A. ToDoubleFunction
B. Supplier
C. BiFunction
D. LongConsumer

Given this enum declaration:

Examine this code:
System.out.println(Letter.values()[1]);
What code should be written at line 5 for this code to print 200?
A. public String toString() { return String.valueOf(ALPHA.v); }
B. public String toString() { return String.valueOf(Letter.values()[1]); }
C. public String toString() { return String.valueOf(v); }
D. String toString() { return "200"; }
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.