Home » JAVA Programming » Collections » Question
  1. What is the output of this program?
    import java.util.*;
    public class date_Example
    {
    public static void main(String args[])
    {
    Date object = new Date();
    System.out.print(object);
    }
    }
    1. Any Garbage Value
    2. Prints Present Time & Date
    3. Runtime Error
    4. Prints Present Date
    5. None of these
Correct Option: B

Wed Nov 21 05:52:45 UTC 2018



Your comments will be displayed only after manual approval.