| preferred AP College board partner for AP classes
Login
 
Register
String Concatenation With Primitive Types
< Prev
Next >

All of the following statements about concatenating String objects with primitive types in Java are true EXCEPT:

int number = 10;
System.out.println("The number is " + number);
A

Proper use of concatenation can be useful for constructing dynamic messages in output.

B

Attempting to concatenate a string with a number using the + operator will result in a compile-time error.

C

Concatenation allows combining strings with other primitive types to form a complete expression.

D

The + operator, when used with a string, performs implicit conversion of non-string operands to strings.

Check Answer
APFIVE © 2020.
Email: [email protected]|Privacy Policy