Home » JAVA Programming » Date & Time » Question
  1. What is the output of this program?
    import java.text.*;
    import java.util.*;
    public class DateFormatting_Example
    {
    public static void main(String args[])
    {
    Date d = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd yyyy");
    System.out.print(sdf.format(d));
    }
    }
    1. 26 2018
    2. Nov 26 2018
    3. Mon Nov 26 2018
    4. Mon
    5. Mon 26 2018
Correct Option: A

Mon Nov 26 2018



Your comments will be displayed only after manual approval.