+ 4

What is output of "hi"+""+"hello"

22nd Mar 2018, 5:26 AM
Anshuman Sethia
Anshuman Sethia - avatar
5 Answers
+ 3
You have 3 strings: The first contains the 'hi' The second contains nothing The third contains 'hello' In this case, the second is not useful, but it can be if you add a space or a coma like: "hi" + " " + "hello": hi hello "hi" + ", " + "hello": hi, hello
22nd Mar 2018, 5:55 AM
Mane Antonio
Mane Antonio - avatar
+ 2
hihello
22nd Mar 2018, 5:29 AM
Mane Antonio
Mane Antonio - avatar
+ 2
No use
22nd Mar 2018, 5:55 AM
Avraneel Pal
Avraneel Pal - avatar
+ 2
Initialize an empty String using String s=""; Convert other types easily to String by adding "" String s = 15 + "";
22nd Mar 2018, 6:12 AM
Andreas K
Andreas K - avatar
0
Then what is use of ""
22nd Mar 2018, 5:50 AM
Anshuman Sethia
Anshuman Sethia - avatar