public class Date
{
private int day;
private int month;
private int year;
public Date() //default constructor
{
...
}
public Date(int mo, int da, int yr) //constructor
{
...
}
public int month() //returns month of Date
{
...
}
public int day() //returns day of Date
{
...
}
public int year() //returns year of Date
{
...
}
//Returns String representation of Date as "m/d/y", e.g. 4/18/1985.
public string toString()
{
...
}
}
Which of the following will cause an error message?
I Date d1 = new Date(8, 2, 1947);
Date d2 = d1;
II Date d1 = null;
Date d2 = d1;
III Date d = null;
int x = d.year();
(A) I only
(B) II only
(C) III only
(D) II and III only
(E) I, II, and III