public class DateThreeT {
public static void main(String [] args) {
DateThree dateobj = new DateThree();
dateObj.setDay(03);
dateObj.setMonth(19);
dateObj.setYear(2016);
System.out.println(The date is:" + dateobj.getDay() + "\" +
dateobj.getMonth() "\" + dateobj.getYear());
}
}
答案 0 :(得分:1)
有很多错误(比如dateObj和dateobj不一样)我已修复所有错误
public class Assignment1 {
public static void main(String [] args) {
DateThree dateObj = new DateThree();
dateObj.setDay(03);
dateObj.setMonth(19);
dateObj.setYear(2016);
System.out.println("The date is:" + dateObj.getDay() + "\\" + dateObj.getMonth() + "\\" + dateObj.getYear());
}
}
答案 1 :(得分:0)
你错过了日期之前和 getMonth()之后的<。
System.out.println("The date is:" + dateobj.getDay() + "\" +
dateobj.getMonth()+ "\" + dateobj.getYear());