lunedì 1 aprile 2013

Q108


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.

 risposta : C
In realtà la vera uscita, tenendo conto che si hanno dei println e non dei print (si va a capo) è :
square
circle
...
 

Nessun commento:

Posta un commento