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
|
1461 Discussions
|
Please Login in order to post a comment
import java.time.LocalDate; import java.util.*;
public class DateAndTime { public static String findDay(int month,int day,int year){
}
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]; } }