Miscelaneous
int x = 1;
while (x != 100)
x*=2;
System.out.println(x);
This is the the result of the executing the code above.
for(int j = 0; j <= 100; j += 2)
for(int k = 100; k > 0; k--)
x++;
if (num > 0)
if (num < 10)
System.out.println("AAA");
else
System.out.println("BBB");
This is printed after executing the code above if num = 20.
public boolean mystery(int x){
if (x == 0)
return true;
else if (x < 0)
return false;
else
return mystery(x - 2);
}
for ( int j = 2; j < 10; j+=2 )
System.out.print( __________ + ", " );
System.out.println( );