Q. How to convert Date object to String?
β
Correct Answer: (B)
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
sdf.format(new Date());
You must be Logged in to update hint/solution