Exam 2: Basic Elements of Java

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

Which of the following statements about a named constant is NOT true?

(Multiple Choice)
4.9/5
(46)

Suppose that alpha and beta are int variables. The statement alpha = --beta; is equivalent to the statement(s) ____.

(Multiple Choice)
4.9/5
(34)

If ++x is used in an expression, first the expression is evaluated, and then the value of x is incremented by 1.

(True/False)
4.8/5
(37)

The character sequence \n moves the insertion point at the end of the current line.

(True/False)
4.8/5
(32)

The value of a variable may change during program execution.

(True/False)
4.8/5
(38)

Given Char ch; Int num; Double pay; Which of the following assignment statements are valid? (i) ch = ' * ' ; (ii) pay = num * pay; (iii) rate * 40 = pay;

(Multiple Choice)
4.9/5
(42)

Which of the following is a valid char value?

(Multiple Choice)
4.8/5
(40)

Suppose console is a Scanner object initialized with the standard input device. The expression console.nextInt(); is used to read one int value and the expression console.nextDouble(); is used to read two int values.

(True/False)
4.7/5
(39)

An operator that has only one operand is called a unique operator.

(True/False)
4.8/5
(33)

The value of the expression 14 % 3 is ____.

(Multiple Choice)
4.8/5
(39)
Showing 41 - 50 of 50
close modal

Filters

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