+ 3
String Concatination
String firstName, lastName; firstName = "David"; lastName = "Williams"; System.out.println("My name is " + firstName +" "+lastName); this is the code that you shown there string concatenation. There is no concatenation occuring in the code you just printed that two names with a space between them. what's the actual meaning of concatenation?concatenation means joining or link together. You did nothing there like that
7 ответов
+ 31
+ is overloading operator in java
//for numbers it adds , for strings it concatinates
example ::: int a=1+2; String b="abc"+"zyx";
+ 13
What the code did is it concatenated all of the strings first, then print it out as a new string. It didn't print it one by one.
+ 3
what is the error you are getting because code looks fine
+ 3
+ dont acts as seperator in java
+ 2
the concatenation operator is +.right
In java the work of separator is also done by the symbol +,where as in C comma(,) is used as the separator.
I need to know ,in that code ,where the symbol '+' acts as a separator and where does it acts as string concatenation operator
+ 2
ok ,tanz
0
but Java doesn't support operator overloading......