Question: Date class implementation is given in the figure. Which of the following correctly constructs a Date object? (1) Date d = new (2, 13, 2020);

Date class implementation is given in the figure. Which of the following correctly constructs a Date object? (1) Date d = new (2, 13, 2020); (II) Date d = new Date(2, 13, 2020); (III) Date d; d = new (2, 13, 2020); (IV) Date d; d = Date(2, 13, 2020); (V) Date d = Date(2, 13, 2020); public class Date { private int day; private int month; private int year; public Date() { } public Date (int mo, int da, int yr) ( } public int getMonth() { } public int getDay () { } public int getYear() { } //Returns String representation of Date as "m/d/y" public String toString() { }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
