CS Ch5 T/F

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

In a for loop, the control variable is always incremented.

F

The for loop is a posttest loop that has built-in expressions for initializing, testing, and updating.

F

The while loop is always the best choice in situations where the exact number of iterations is known.

F

When the break statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the loop prepares for the next iteration.

F

A file must always be opened before using it and closed when the program is finished using it.

T

The do-while loop is ideal in situations where you always want the loop to iterate at least once.

T

When the continue statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the loop prepares for the next iteration.

T

When you open a file with the PrintWriter class, the class can potentially throw an IOException.

T

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.

T

You can use the PrintWriter class to open a file and write data to it.

T


Set pelajaran terkait

Business Foundations Ch 10-16 prac probs

View Set

PHED 1164: Introduction to Physical Fitness & Wellness Mid-Term Exam: Chapters 1-4 & 8 Cardiovascular Risks

View Set

ch.5 Promulgated Contract Forms (Real Estate)

View Set

Anatomy Lab Quiz 1 (ch. 1, 3, 4, & 5 pre-lab quizzes)

View Set

FIN 430 Chapter 6 Assignment/Poll Questions

View Set

Dynamic Earth: Charac. of the Seafloor

View Set