String concatenation with +: The + operator joins Strings and converts other types to String when one operand is a String.
How to apply it: Evaluate left-to-right: 2 + 3 + "hi" produces "5hi" but "hi" + 2 + 3 produces "hi23".
Course: AP Computer Science A · Unit: Primitive Types
Practice questions about String concatenation with + on AimFive — get rubric-based feedback showing exactly which points you earned.
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.