You are not logged in.

#1 2015-06-10 10:58:52

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

Compile Time Error:

Question:
class test
{

public static void main(String[] args)
{
Date d = new Date(2011343412345L);
DateFormat df = new DateFormat();
System.out.println(df.format(d));
}

}

What would be the result?

Option A):
A compile time error.
Option B):
2011343412345L
Option C):
26 Sep, 2033
Option D):
An exception is thrown at runtime

Correct Answer is Option A):
A compile time error.


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-06-10 10:58:52

Advertisement
Ads By Google

Re: Compile Time Error:



Board footer