Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

refer to the following Date class declaration: public class Date {private int da

ID: 3921067 • Letter: R

Question

refer to the following Date class declaration: public class Date {private int day; private int month; private int year; public Date()//default constructor} ...} public Date(int no, int da, int yr)//constructor {...} public int nonth()//returns month of Date {...} public int day()//returns day of Date {...} public int year()//returns year of Date {...}//Returns String representation of Date as "n/d/y". e.g. 4/18/1985. public String toString() {...}} Which of the following correctly constructs a Date object in a client class? Date d = new (2, 13, 1947); Date d = new Date(2, 13, 1947); Date d; d = new (2, 13, 1947); Date d; d = Date(2, 13, 1947); Date d = Date(2, 13, 1947);

Explanation / Answer

Answer is B) Date d = new Date(2,13,1947);

Explaination:

to create an object we use new keyword.

example

and to create an object and to call contruct .

so in above statement .answer is

Date d = new Date(2,13,1947);