What updates d’s value with the date represented by ds?

Given a valid DateFormat object named df, and
16. Date d = new Date(0L);
17. String ds = “December 15, 2004”;
18. // insert code here
What updates d’s value with the date represented by ds?

Given a valid DateFormat object named df, and
16. Date d = new Date(0L);
17. String ds = “December 15, 2004”;
18. // insert code here
What updates d’s value with the date represented by ds?

A.
18. d = df.parse(ds);

B.
18. d = df.getDate(ds);

C.
18. try {
19. d = df.parse(ds);
20. } catch(ParseException e) { };

D.
18. try {
19. d = df.getDate(ds);
20. } catch(ParseException e) { };



Leave a Reply 0

Your email address will not be published. Required fields are marked *