Given:
You want the code to produce this output:
John
Joe
Jane
Which code fragment should be inserted on line 1 and line 2 to produce the output?
Which three guidelines are used to protect confidential information? (Choose three.)
Given the content from the course.txt file:
Which code fragment at line 1 prints the lines that contain Java from the course.txt file?
A)
B)
C)
D)
E)
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?
Given:
String originalPath = “data\\projects\\a-project\\..\\..\\another-project”;
Path path = Paths.get(originalPath);
System.out.print(path.normalize());
What is the result?
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?
Given:
jdeps -jdkinternals C:\workspace4\SimpleSecurity\jar\classes.jar
Which describes the expected output?
Given:
Examine these requirements:
Which method can be added to meet these requirements?
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?
Which is the correct order of possible statements in the structure of a Java class file?
Which method throws an exception for not-a-number and infinite input values?
A)
B)
C)
D)
Given:
public class X {
}
and
public final class Y extends X {
}
What is the result of compiling these two classes?
Given:
executed using this command:
java Myclass My Car is red
What is the output of this class?
Given:
Which two statements can be added at line 1 in Bar to successfully compile it? (Choose two.)
Given:
You want to use the myResource class in a try-with-resources statement. Which change will accomplish this?
Given:
Which option should you choose to enable the code to print Something happened?
Given the Customer table structure:
• ID Number Primary Key
• NAME Text Nullable
Given code fragment:
Which statement inserted on line 14 sets NAME column to a NULL value?