0
what is string concatenation plz explain in detail i am confused too much
2 Answers
+ 3
Concatenation means "link together". String concatenation means linking strings together and in result you get a new string that contains the strings together which you had given for concatenation. We use '+' operator for this.
String word1,word2,new_word;
word1 = "Java";
word2 = "Language";
new_word = word1+word2;
System.out.println("Learning" + new_word);
//Prints: Learning JavaLanguage
0
it' like sum of strings...
String firstName="Bob";
String lastName="Smith";
String name=firstName+lastName;
System.out.print(name); //BobSmith