Given an application with a main module that has this module-info.java file:
Which two are true? (Choose two.)
You are working on a functional bug in a tool used by your development organization. In your investigation, you find that the tool is executed with a security policy file containing this grant.
What action should you take?
Which code fragment added to line 1 enables the code to compile and print Hello Joe?
A)
B)
C)
D)
Given:
Which two methods facilitate valid ways to read instance fields? (Choose two.)
Given:
executed using this command:
java Myclass My Car is red
What is the output of this class?
Which two commands are used to identify class and module dependencies? (Choose two.)
Given:
and
Which two method definitions at line n1 in the Bar class compile? (Choose two.)
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?
Given:
Which two constructors will compile and set the class field strings? (Choose two.)
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:
Which option should you choose to enable the code to print Something happened?
Given:
Which three actions implement Java SE security guidelines? (Choose three.)