0

why we use '+' between two string? if we don't write then also it will appear the same output.. so what is the use of that plus

22nd Oct 2020, 4:02 AM
Kushal Barot
Kushal Barot - avatar
4 Answers
+ 5
You can refer this Java code from line 200.. You'll see how the use of "+" increased the readability. https://code.sololearn.com/c1h675adCP47/?ref=app
22nd Oct 2020, 4:41 AM
Minho
Minho - avatar
+ 4
Like tabs, enter, spaces... Sometimes programmer wanna separe to understand better.
22nd Oct 2020, 4:21 AM
Marcelo Anjos
Marcelo Anjos - avatar
+ 2
+ is used to concatenate two or more strings.
22nd Oct 2020, 4:17 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
It's useful when you have a number that changes and you want to + a string to it. int a = 10; System.out.println("There are "+a+" apples"); --a; System.out.println("There are "+a+" apples");
22nd Oct 2020, 5:53 AM
D_Stark
D_Stark - avatar