InterviewSolution
Saved Bookmarks
| 1. |
Which of these operators can be used to concatenate two or more String objects?(a) +(b) +=(c) &(d) ||I got this question during an online interview.My question comes from String Handling Basics topic in section String Handling of Java |
|
Answer» RIGHT choice is (a) + For explanation I WOULD say: Operator + is used to concatenate strings, EXAMPLE String s = “i ” + “like ” + “JAVA”; String s CONTAINS “I like java”. |
|