Java Ch. 4

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What will be the value of x after the following code is executed? int x = 10, y = 20; while (y < 100) { x += y; y += 20; }

210

If a loop does not contain within itself a way to terminate, it is called a(n):

Infinite loop

What will be the values of x and y as a result of the following code? int x = 25, y = 8; x += y++;

x = 33, y = 9

A loop that executes as long as a particular condition exists is called a(n):

Conditional loop

This is an item that separates other items.

Delimiter

Java provides a set of simple unary operators designed just for incrementing and decrementing variables.

True

When you pass the name of a file to the PrintWriter constructor, and the file already exists, it will be erased and a new empty file with the same name will be created.

True

Assuming that inputFile references a Scanner object that was used to open a file, which of the following statements will read an int from the file?

int number = inputFile.nextInt();

A sentinel value ________ and signals that there are no more values to be entered.

is a special value that cannot be mistaken as a member of the list


संबंधित स्टडी सेट्स

Rosetta Stone French Unit 18, L3

View Set

Homework: 4.1/4.2 Correlation and Least-Squares Regression

View Set