Hello,
I have a Leap year assignment that requires that I implement a public class Date and a class named DateJDialog.java.Here is what I wrote:
Date.java compiles correctly. DateJDialog.java gives me the following compliation errors:
DateJDialog.java:21: error: variable d is already defined in method main(
String[])
Date d = new Date(m,d,y);
^
DateJDialog.java:23: error: int cannot be dereferenced
boolean b = d.isLeapYear(y);
^
DateJDialog.java:25: error: cannot find symbol
JOptionPane.showMessageDialog(null," If someone said the date " + m + "/" + d + "/" + y + "is a leap year , that statement would be " + b + ".");
^
symbol: variable b
location: class DateJDialog
3 errors
Can anyone help me? I hope I've obeyed the forum rules.
Thanks,
captgbv