12/4 Lab Java Constructor
public class Demo
{ public static void main(String[] args)
{ Date
// date1=new Date("December",16,1770),
// date2=new Date(1,27,1756),
// date3=new Date(1882),
// date4=new Date();
birthday = new Date("January",1,2000);
System.out.println(birthday);
birthday.setDate("February",1,2000);
System.out.println(birthday);
birthday = new Date("March",1,2000);
System.out.println(birthday);
}
}
0 Comments:
Post a Comment
<< Home