Computer Programming Chapter 4 Review

¡Supera tus tareas y exámenes ahora con Quizwiz!

Flag

A boolean variable that signals when some expression exists in a program

True or False

A flag may have the values

True

A local variable's scope always ends at the closing brace of the block of code in which it is declared

True

An important style rule you should adopt for writing if statements is to write the conditionally executed the statement on the line after the if statement

False

An important style rule you should follow when writing if statements is to line up the conditionally executed statement with the if statement

True

Because the && operator performs short-circuit evaluation, your boolean expression will usually execute faster if the sub-expression most likely false expression is on the left

True

Because the || operator performs short-circuit evaluation, your boolean statement will generally run faster if the sub-expression that is most likely to be true is on the left

Block of Statements

Enclosing a group of statements inside a set of braces creates a

Unicode Character Code

In Java, when a character is stored in memory, it is actually as a(an)

False

In a switch statement, if 2 different values for the CaseExpression would result in the same code being executed, you must have 2 copies of the code

The statement or block following the else statement is executed

In an if/else statement, if the boolean expression is false, then

Relational Operators

Operators that are used to determine whether a specific relationship exists between 2 values

if

The ______ statement is used to make simple decisions in Java

True or False

The expression in an if statement must evaluate to

True

The if/else statement will execute one group of statements if its boolean expression is true or another group if its boolean expression is false

True

Unicode is an international encoding system that is extensive enough to represent ALL the characters of ALL the world's alphabets

False

When testing for character values, the switch statement does not test for the case of the character

False

When two Strings are compared using the compareTo method, the cases of the two Strings are not considered


Conjuntos de estudio relacionados

CH12 Disaster and Incidents 1.4 1.5 5.4-5.6

View Set

Chpt 17: Activity-Based Costing and Analysis

View Set

CIST2613 Ethical Hacking & Pen Testing Final Exam Chapters 9-15 Questions

View Set

Exam I, Modules1-2; GLY1102, Sum20

View Set