Java Chapter 4: Loops and Files
a data set by xnity
created February 27, 2016
Create a game to test your knowledge!
See all 0 games!
See fewer games
|Which statement will *not* increment the variable "number"?||number = number + 1;||number += 1;||number++;||number+ = 1;||D|
|Which statement will *not* decrement a variable called number?||number- = 1;||number = number - 1;||number--;||number -= 1;||A|
|What will: number = 4; System.out.println(number++); Print out?||4||number||5||6||A|
|What will: number = 4; System.out.println(++number); Print out?||number||3||4||5||D|
|What happens first in the second line of this code: int x = 1, y; y = x++;||The variable x is incremented||It assigns the value of x to the variable y||1 is assigned to x||y is converted to an integer||B|
|What will: x = 2; y = x++; System.out.println(y); Display?||2||y||3||Error||A|