0

what is string concatenation plz explain in detail i am confused too much

23rd Jul 2016, 5:13 PM
Arkm Shahid
Arkm Shahid - avatar
2 Réponses
+ 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
24th Jul 2016, 5:56 AM
Dhana sri sowmya avidi
Dhana sri sowmya avidi - avatar
0
it' like sum of strings... String firstName="Bob"; String lastName="Smith"; String name=firstName+lastName; System.out.print(name); //BobSmith
23rd Jul 2016, 5:27 PM
Petar Suvajac
Petar Suvajac - avatar