3:11 pm - Monday November 23, 6533

Date in java example program for set Time(long time)

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 setTime(long time)
*/
import java.util.Date;
public class MyClass
{
public static void main(String[] args)
{
Date d=new Date();
d.setTime(-1332403);
System.out.println(d);
}
}

Output:
Thu JanĀ  01 05:07:47 IST 1970

 

BACK

Filed in: Z-A All Java Codes

Comments are closed.