I have been working on this assignment for 2 days now and I have had this error message. I hope a fresh set of eyes will help me.
Here is my code
import javax.swing.JOptionPane; //Louis Friedmann //July 09, 2013 //This program prints the output in dialog boxes public class DateJDialog { public static void main(String[] args) { //Variables Declaration String inputString; //input int dayIs; //day int yearIs; // year int monthIs; //month String leapResult; // tell's whether it's a leap year or not. //Input inputString = JOptionPane.showInputDialog("What is the day?"); dayIs = Integer.parseInt(inputString); inputString = JOptionPane.showInputDialog("What is the month?"); monthIs = Integer.parseInt(inputString); inputString = JOptionPane.showInputDialog("What is the year."); yearIs = Integer.parseInt(inputString); //calculation if (isLeapYear(yearIs)) { leapResult = " is a leap year"; } else { leapResult = yearIs + " isn't a leap year"; } //output JOptionPane.showMessageDialog(null, leapResult); //exits the program System.exit(0); } }
And this is my error message:
C:\Users\Friedmann\Desktop\Java\Assignment 5\DateJDialog.java:34: error: cannot find symbol
if (isLeapYear(yearIs))
^
symbol: method isLeapYear(int)
location: class DateJDialog
1 error
Tool completed with exit code 1
Please help!!!!!!
Thanks.