For Example I have the date: \"23/2/2010\" (23th Feb 2010). I want to pass it to a function which would return the day of week. How can I do this?
I
Below is the two line of snippet using Java 1.8 Time API for your Requirement.
LocalDate localDate = LocalDate.of(Integer.valueOf(year),Integer.valueOf(month),Integer.valueOf(day)); String dayOfWeek = String.valueOf(localDate.getDayOfWeek());