I am trying to compare two dates placed in the main method. I needed to come up with a logic that will compare the two dates, to see if one or the other are the same date, or which one came before.
I am having a bit of trouble with getting the values into my boolean method. The methods have to be seperate - Main method has to hold the date values, and the boolean methods have to deal with the logic within the class.
my main and boolean so far
public static void main(String[]args)
{
SimpleDate one = new SimpleDate("1999-01-23");
SimpleDate two = new SimpleDate("1998-03-23");
//one.displayDate();
//two.displayDate();
}
/*
public boolean isAfter(int SimpleDate){
boolean isAfter = false;
isAfter = one.equals(two);
if(isAfter == true);
System.out.println ("true");
else
return false;
}
Does anyone have any advice? or pointers? and also, my "else" statement at the end keeps giving me errors as well.