Hacker rank 12th java problem solution
12.JAVA DATE AND TIME
import java.time.LocalDate;
public class Solution {
public static String getDay(String day, String month, String year) {
LocalDate lcd = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day));
return lcd.getDayOfWeek().toString();
}
Comments