Examveda

What will be the output of the following Java code?
import java.util.*;
class date
{
    public static void main(String args[])
    {
        Date obj = new Date();
        System.out.print(obj);
    }
}

A. Prints Present Date

B. Runtime Error

C. Any Garbage Value

D. Prints Present Time & Date

Answer: Option D


This Question Belongs to Java Program >> Collections Framework In Java

Join The Discussion

Related Questions on Collections Framework in java