Java Reference
In-Depth Information
Select the best answer.
2.
if
(6 < 2 * 5)
System.out.print("Hello");
System.out.print(" There");
a.
outputs the following:
i.
Hello There
ii.
Hello
iii.
Hello
iv.
There
There
if
('a' > 'b' || 66 > (
int
)('A'))
System.out.println("#*#");
b.
4
outputs the following:
i.
#*#
ii.
#
iii.
*
iv.
none of these
*
#
if
(7 <= 7)
System.out.println(6 - 9 * 2 / 6);
c.
outputs the following:
i.
-1
ii.
3
iii.
3.0
iv.
none of these
if
(7 < 8)
{
d.
System.out.println("2 4 6 8");
System.out.println("1 3 5 7");
}
outputs the following:
i.
2 4 6 8
ii.
1 3 5 7
iii.
none of these
1 3 5 7
if
(5 < 3)
System.out.println("*");
else if
(7 == 8)
System.out.println("&");
else
System.out.println("$");
e.
outputs the following:
i.
*
ii.
&
iii.
$
iv.
none of these
Search WWH ::
Custom Search