0
我如何將dateBirth
和dateToday
設置爲等於我以mm/dd/yyyy格式輸入的值?我想設置簡單值,所以我可以比較它們以得到一個年齡
public class AgeClientFL {
public static void main(String [] args){
int month, day, year;
day = UtilsFL.readInt("Enter birth day: ",false); // String mode
month = UtilsFL.readInt("Enter birth month: ",false);
year = UtilsFL.readInt("Enter birth year: ",false);
SimpleDate dateBirth = new SimpleDate();
day = UtilsFL.readInt("Enter todays day: ",true); // JOptionPane mode
month = UtilsFL.readInt("Enter todays month: ",true);
year = UtilsFL.readInt("Enter todays year: ",true);
SimpleDate dateToday = new SimpleDate();
}
}
默認情況下,Java中沒有類'SimpleData'。 – Veluria
你看過你的SimpleDate類的文檔/源代碼嗎? – DNA