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 subsequent code segments will cause an error?
(A) string s = d.toString();
(B) int x = d.day();
(C) Date e = d;
(D) Date e = new Date(1, 13, 2002);
(E) int y = d.year;