Question: IN JAVA Write DateTest class which includes the main method. (1) The program should create three objects of the Date class and one of them
IN JAVA
Write DateTest class which includes the main method.
(1) The program should create three objects of the Date class and one of them should use the default constructor and the other two use three-parameter constructor.
(2) Print all three dates using toString method.
(3) Change the month, day, and year of one of the dates using set methods, and then use get methods to display the new value of month, day, and year.
(4) Print all three dates again using printDate method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
