+ 1

Why do use ""+" in system.out.println in java ?

8th Jul 2017, 2:18 PM
Mohamed elqandili
Mohamed elqandili - avatar
6 Answers
+ 7
To add things together... If you use it on two strings, it will print both consecutively. If you have two numbers, it will add them and output.
8th Jul 2017, 2:19 PM
J.G.
J.G. - avatar
0
string+string = concatenation System.out.println("Solo"+"Learn");
8th Jul 2017, 3:31 PM
Andrés04_ve
Andrés04_ve - avatar
0
no i meant in other data typea
8th Jul 2017, 3:51 PM
Mohamed elqandili
Mohamed elqandili - avatar
0
i got it when want to display a sentence and a value after it we put the sentence inside the "" and we add + then the variable that we want to display its value
8th Jul 2017, 3:52 PM
Mohamed elqandili
Mohamed elqandili - avatar
0
strings+string/string+num = concatenation num+num = add
8th Jul 2017, 4:05 PM
Andrés04_ve
Andrés04_ve - avatar
0
yes yes thanks man
8th Jul 2017, 4:10 PM
Mohamed elqandili
Mohamed elqandili - avatar