Exam 4: Control Statements: Part 1

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Local variables must be ________.

(Multiple Choice)
4.9/5
(40)

Which of the following is not a control structure:

(Multiple Choice)
4.9/5
(30)

Which of the following terms is not used to refer to a sentinel value that breaks out of a while loop?

(Multiple Choice)
4.9/5
(34)

Which of the following is not a primitive type?

(Multiple Choice)
4.8/5
(35)

Which of the following is not represented graphically in activity diagrams for control structures?

(Multiple Choice)
4.9/5
(40)

Which of the following operators associates from left to right?

(Multiple Choice)
4.8/5
(33)

Which of the following is true?

(Multiple Choice)
4.7/5
(29)

Where can local variables declared within a method's body be used?

(Multiple Choice)
4.8/5
(33)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(36)

Which primitive type can hold the largest value?

(Multiple Choice)
4.9/5
(37)

Which statement is true?

(Multiple Choice)
4.9/5
(40)

What is the result value of c at the end of the following code segment? Int c = 8; C++; ++c; C %= 5;

(Multiple Choice)
4.9/5
(32)

Keyword ________ indicates the inheritance relationship.

(Multiple Choice)
4.7/5
(29)

The empty statement is denoted by what symbol?

(Multiple Choice)
4.8/5
(35)

Which of the following statements is true?

(Multiple Choice)
4.9/5
(37)

Which of the following code segments does not increment val by 3:

(Multiple Choice)
4.9/5
(33)

Which of the following is a double-selection control statement?

(Multiple Choice)
4.8/5
(40)

Java is considered a strongly typed language because:

(Multiple Choice)
4.8/5
(40)

What is the size in bits of an int?

(Multiple Choice)
4.8/5
(40)

What is output by the following Java code segment? Int temp = 180; If (temp > 90) { System.out.println("This porridge is too hot."); // cool down Temp = temp - (temp > 150 ? 100 : 20); } Else { If (temp < 70) { System.out.println("This porridge is too cold."); // warm up Temp = temp + (temp < 50 ? 30 : 20); } } If (temp == 80) System.out.println("This porridge is just right!");

(Multiple Choice)
4.8/5
(30)
Showing 21 - 40 of 42
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)