Menu
Question Index
...

Write a program to identify the week day of the given date.

Input (Calendar) Output (String)
2013-Jan-18 Friday
2013-Jun-19 Wednesday
2005-Dec-25 Sunday
2001-Jul-7 Saturday
2044-Nov-14 Monday


import java.util.*;
class IdentifyTheDayOfTheDate
{
    public static void main(String s[])
    {
        Calendar cal = new GregorianCalendar();
        cal.set(2013, 0, 18); // Note - January is 0, February is 1 etc.;
        System.out.println("Day of 2013-Jan-18 is: " + dayOfDate(cal));

    }


    public static String dayOfDate(Calendar cal) {
    String result = null;
    return result;
    }

}

Doubts

Problems

Topic: Java GregorianCalendar

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App