7:59 am - Friday March 24, 2017

Calendar in java example program hashCode()

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.com
@description:calendar  in java example program hashCode()
*/
import java.util.Calendar;
public class HashCode {
public static void main(String args[]) {
// create a calendar
Calendar calen = Calendar.getInstance();
// display current calendar
System.out.println("the current calendar is:" + calen.getTime());
// get the hashcode and print it
int p = calen.hashCode();
System.out.println("the hashcode is :" + p);
}
}

//OUTPUT
the current calendar is: Thu Nov 29 12:28:24 GMT+05:30 2012
the hashcode is:-571294398

BACK

 

Filed in: Z-A All Java Codes

Comments are closed.