A Admin • 802.91K Points Coach Report Q. How to convert a String to a Date object? (A) SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd"); sdf.parse(new Date()); (B) * operator has converted b * 50 into int, which can not be converted to byte without casting (C) SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd"); new Date().parse(); (D) SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd"); new Date().format(); Correct Answer - Option(A) Views: 6 Filed under category Java Hashtags: Share Manage Tags
Discusssion
Login to discuss.