Multiple Choice
We want to create a class that represents a date. A date has a day, month, and year. For example, the date March 16, 2014 has the day 16, month 3, and year 2014. The basic framework of a date class is below: public class Date
{
Private int day;
Private int month;
Private int year;
}
We want to create a specific date using code like:
Date first = new Date (16, 3, 2014) ;
// Creates March 16, 2014
Date second = new Date (1, 9, 2013) ;
// Creates September 1, 2013
Which of the constructor specifications below will allow this code to behave as desired?
A) public void Date (int d, int m, int y)
B) public init (int d, int m, int y)
C) public Date (int d, int m, int y)
D) public Date Date (int d, int m, int y)
Correct Answer:

Verified
Correct Answer:
Verified
Q22: Which of the following corresponds to the
Q23: You should declare all instance variables as
Q26: Fill in the blank in the following
Q29: Given this method comment, fill in the
Q30: Documentation _ can be used to describe
Q31: We want to change the BankAccount class
Q32: Assuming the following code is the body
Q83: Consider the constructor of the BankAccount class
Q90: A method is invoked on what type
Q107: An instance variable declaration consists of which