Java OCA OCP Practice Question 2006

Question

Which of the following operators cannot have an operand of type String?.

Select the two correct answers.

  • (a) +
  • (b) -
  • (c) +=
  • (d) .
  • (e) &


(b) and (e)

Note

The operators - and & cannot be used in conjunction with a String object.

The operators + and += perform concatenation on strings, and the dot operator accesses members of the String object.




PreviousNext

Related