Which method should be used to convert a Date to a String in the current user’s locale?

Which method should be used to convert a Date to a String in the current user’s locale?
A . Date.format
B . String format
C . String.valueOf
D . Date.parse

Answer: C

Latest PDII Practice Questions with 280 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
1 Comment
JJ
JJ
5 years ago

Date.format is correct

String.valueOf returns standard format yyyy-MM-dd