Given the code fragment:
int b = 3;
if ( !(b > 3)) {
System.out.println("square ");
}{
System.out.println("circle ");
}
System.out.println("...");
What is the result?
A.
square…
B.
circle…
C.
squarecircle…
D.
Compilation fails.
Given the code fragment:
<code>
int b = 3;
if ( !(b > 3)) {
System.out.println(“square “);
}{
System.out.println(“circle “);
}
System.out.println(“…”);
</code>
What is the result?
Given the code fragment:
int b = 3;
if ( !(b > 3)) {
System.out.println("square ");
}{
System.out.println("circle ");
}
System.out.println("...");
What is the result?
A.
square…
B.
circle…
C.
squarecircle…
D.
Compilation fails.
Ans:C
But the output console statement should be print instead of println.