We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Introduction
- Java Date and Time
- Discussions
Java Date and Time
Java Date and Time
Sort by
recency
|
1460 Discussions
|
Please Login in order to post a comment
Easy Solution
class Result {
}
my answer by pass All testcase
public static String findDay(int month, int day, int year) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day); int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); System.out.println(dayOfWeek); String[] dayOf = { "SUNDAY", "MONDAY",
"TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY" }; return dayOf[dayOfWeek - 1]; } }
//Using Zeller's Congruence Formula
import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.function.; import java.util.regex.; import java.util.stream.; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; import java.time.;
class Result {
}
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
}