#Problem 1 help
1 messages · Page 1 of 1 (latest)
public class Date {
public int myMonth, myDay, myFullYear;
// Constructor definition
Date(int inMonth, int inDay, int inFullYear){
myMonth = inMonth;
myDay = inDay;
myFullYear = inFullYear;
}
public static Date callingConstructorExercise() {
// replace "null" below with a call to the constructor
// that has a month of 9, a day of 8 and a full year of
// 2026
Date d = new Date(9, 8, 2026);
return d;
}
}
@bold plover this is a bit little to go on, are you struggling with defining constructors for the others or?
Your Date code looks alright and as you see on the screenshot other tests do not pass which are unrelated to what u've send