Question: Java Assume that datel and date2 are objects of class IncDate as defined in Section 1.2 Organizing Classes. What would be the output of the
Assume that datel and date2 are objects of class IncDate as defined in Section 1.2 "Organizing Classes." What would be the output of the following code? datel = new IncDate (5, 5, 2000); date2 = new IncDate (5, 5, 2000); System.out.println(datel); System.out.println(date); datel.increment (); System.out.println(datel); System.out.println(date); datel date 2; System.out.println(datel); System.out.println(date); Make sure that the dates are in the format of "1/30/2010" (Do not pad leading for days or months). Refer to the tostring method defined on Page 3 of the textbook for more details
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
