Given:
Which two methods facilitate valid ways to read instance fields? (Choose two.)
Given:
and
Which code fragment on line 1 makes the s1 set contain the names of all employees born before January 1, 1989?
Given the code fragment:
Which can replace line 2?
Given:
What is the result?
Given the code fragment:
What is the result?
Given:
What is the result?
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?
Assuming the Widget class has a getPrice method, this code does not compile:
Which two statements, independently, would allow this code to compile? (Choose two.)
Given:
What is the result?
Given:
Which two constructors will compile and set the class field strings? (Choose two.)