You are viewing a single comment's thread. Return to all comments →
this is the real answer (Complete)......
import java.util.*;
public class Solution { public static String getDay(String day, String month, String year) {
int year_int = Integer.parseInt(year); if(year_int>2000 && year_int<3000) { Calendar cal = Calendar.getInstance(); cal.set(Integer.valueOf(year), (Integer.valueOf(month) - 1), Integer.valueOf(day)); return cal.getDisplayName(Calendar.DAY_OF_WEEK,Calendar.LONG, Locale.getDefault()).toUpperCase(); }else{ return null; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Date and Time
You are viewing a single comment's thread. Return to all comments →
this is the real answer (Complete)......
import java.util.*;
public class Solution { public static String getDay(String day, String month, String year) {