3:06 pm - Tuesday September 26, 2845

Calendar in java example program equals(Object obj)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

/**
*@author:candidjava
*@description:Date in java example program for equals(Object obj)
**/
import java.util.Date;
public class Equals {
public static void main(String[] args) {
Date date = new Date(55, 6, 30);
Date date2 = new Date(70, 1, 10);
boolean check = date.equals(date2);
System.out.println("Dates are equal:" + check);
}
}

Output:

Dates are equal: false

BACK

Filed in: Z-A All Java Codes

Comments are closed.