<code>String s = "Hi"; s + "!"</code> is equivalent to
- A
s.append("!")
- B
s.push("!")
- C
s.add("!")
- Dcheck_circle
s.concat("!")
Explanation
<code>+</code> on Strings invokes <code>concat</code> semantics (returns a new String).
AP Computer Science A· difficulty 3/5
<code>String s = "Hi"; s + "!"</code> is equivalent to
s.append("!")
s.push("!")
s.add("!")
s.concat("!")
Explanation
<code>+</code> on Strings invokes <code>concat</code> semantics (returns a new String).
Want 10 more like this — adaptive to your weak spots?