import java.
sql.
Date;
class DateTest
{
public static void main
(String[] args
) {
Date today =
Date.
valueOf("2006-08-08");
// use date of today here
Date alsoToday =
new Date(System.
currentTimeMillis());
// has time information and will probably not be equal to "today"
System.
out.
println(today.
equals(alsoToday
));
// false
System.
out.
println(today.
equals(Date.
valueOf(alsoToday.
toString())));
// true
}
}