Menu
Question Index
...


Write a program to get the common working day between Dubai and US. Given that Dubai does not work on Thursday and Friday and the US does not on Saturday and Sunday. Assume that there are no other holidays.

Input (String, int) Output (String)
06-Nov-1990, 74 Mon - 14 Jan, 1991
30-May-2013, 684 Tue - 14 Apr, 2015
18-Jan-1991, 365 Mon - 20 Jan, 1992
15-Aug-1947, 39793 Wed - 26 Jul, 2056
29-Feb-2004, 1461 Mon - 03 Mar, 2008
14-Feb-2014, 81 Tue - 06 May, 2014

class GetCommonWorkingDay

{    public static void main(String s[])
    {
        String currentWorkingDay = "06-Nov-1990";
        int findAfter = 69;
        String commonWorkingDayIs = getCommonWorkingDay(currentWorkingDay, findAfter);
        System.out.println("The common working day after 69 days from 06-Nov-1990 is : " + commonWorkingDayIs);

    }


public static String getCommonWorkingDay(String startingDate, int findAfter) {
//Write code here to get the common working day
return commonWorkingDay;
}
}

Doubts

Problems

Topic: Locale Class In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App