Sunday, 28 August 2016
Q-10 find the output of the following program code.
class demo
{
public static void main(String[] args)
{
System.out.println(null);
}
}
1) NULL 2) C.T.E 3) NULL POINTER EXCEPTION 4) RUN TIME ERROR
ANS:-C.T.E
REASON:-REFERENCED TO println METHOD IS AMBIGUOS BOTH METHOD println (char a[]) in printstream & method println(String) in printstream match.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment