showing results for - "concatenate a string"
Elijah
30 Feb 2020
1//Java
2String firstName = "BarackObama";
3String lastName = " Care";
4//First way
5System.out.println(firstName + lastName);
6//Second way
7String name = firstName + lastName;
8System.out.println(name);
9//Third way
10System.out.println("BarackObama" + " Care");
Noemi
11 Mar 2020
1//The String class includes a method for concatenating two strings :
2
3string1.concat(string2);
4This returns a new string that is string1 with string2 added to it at the end. You can also use the concat() method with string literals 
5
6"My Name is".concat("Zara");
7Strings are most commonly concatenated with the "+" operator
8
9"Hello," + " world" + "!"
10Example
11public class StringDemo {
12
13   public static void main(String args[]) {
14      String string1 = "saw I was ";
15      System.out.println("Dot " + string1 + "Tod");
16   }
17}
18Some String Handling Methods 
19char charAt(int index)  - Returns the character at the specified index. 
20int compareTo(Object o)  - Compares this String to another Object. 
21String concat(String str)  - Concatenates the specified string to the end of this string. 
22boolean equals(Object anObject) - Compares this string to the specified object. 
23boolean equalsIgnoreCase(String anotherString) - Compares this String to another String, ignoring case considerations. 
Angela
04 Oct 2016
1//The String class includes a method for concatenating two strings :
2
3string1.concat(string2);
4This returns a new string that is string1 with string2 added to it at the end. You can also use the concat() method with string literals 
5
6"My Name is".concat("Zara");
7Strings are most commonly concatenated with the "+" operator
8
9"Hello," + " world" + "!"
10Example
11public class StringDemo {
12
13   public static void main(String args[]) {
14      String string1 = "saw I was ";
15      System.out.println("Dot " + string1 + "Tod");
16   }
17}
Mehdi
27 Mar 2018
1let myPet = 'seahorse';console.log('My favorite animal is the ' + myPet + '.'); // My favorite animal is the seahorse.
queries leading to this page
concatenate string with itselfhow to merge 2 stringsconcatinate string togetherhow to combine two strings in javahow to concatenate two stringconcat string in netwhich symbol is used for concatenation of stringsconcatenation of stringstring to concathow to join two strings togetherconcatenate three strings merge stringconcatenating stringsmerge strings 0aconcatenate string with 7b 7b 7d 7dhow to join 2 string variable together javaconcat 28 29 strings c 23concatenar c 23 asp netconcatenated stringstring concatenation codestring concatconcatenation stringsappend two caractereshow to add multiple strings to one anotherwrite a program to concatenate a strings to end another stringdef concatenate 28strings 29 3aconcat 28string 29how to add strings togetherconcat on stringshow to string concatinate in stringyamal combine stringadd strings together bahsconcat 28 29 stringhow to add two strings together in java 3fconcatenation of stringsstring concat stringconcatenation of variable with a stringmerge stringsi can concatenate a string to thisstring concatinationthe concatenation assignment operator 28 3d 29 combines two text strings how to concat a string with another stringstring concatenation meanshow to add to strings together 3fconcat two strings as a one stringstring concatenatioinconcatenate two stringhow to concat two stringshow to concatie stringconcatination stringhow to combine two strings into one string in javac 23 concat stringadd to 5bstring 3astring 5dconcatnate stringsbuilt in concatenate stringprogram to concatenation of strings concat 2 stringsstring concatstring concatenation using 22 5c 22how to add stringsstring concatenation with 60 60join two strings togethercombine two stringshow to add two strings together in javastring concatination in how to concate 5c in stringvariables and string concatenationhow to concatenate stringconcat stringstring using concatenation how add strings togetherconcatinate a stringwhat is string concatenationcombine 2 strings togethercombining 2 strings javaconcatenate string and variablesstringbuilder join 2 strings c 23concatenate a string using string buildrconcat method stringwpf concat sql text 7e concat stringwhy can i concat to a stringhow to join 2 strings togetherstring concatenationconcatenate string with inconcatenate stringshow we concatinat two stringc 23 combine stringsconcat 2 stringhow to concatinate a stringc 23 concatenate two stringstring concatenatedassign a concateated string to another stringstring methods to add two stringsappend stringshow to concat a stringconnect two string in javaconcatenate string c 23concate two stringconcatenate stringc 23 concatvariable string concatenationconcancatinating string using andconcatinate stringadd two stringhow to concatinate 5c in stringstring concatenation c 23how to combine strings jsvs concat on stringconcatenate string inrstring concatencetonhow to concatenate string in anhow to add two stringwhat is string concatenation 27how to concatinate two stringhow do you combine 2 stringshow to add together different stringshow to concat 2 strings withou using concatenationconcattenate stringhow to add a string togetheradding two stringhow to concatenate a string to thisadd two stringsstring concatanationstring concatenatiestring concatenate 2b 3d to concatenate a string 3fhow to make two different strings from one in javaconcatenar stringhow to append stringhow to concat two strings manuallyc 23 join 2 stringshow to add 2 stringsconcatenate a value with a stringhow to add two strings objects together in java 3fstring concatenation functionjava how to combine stringsconcat string meaninghow to concatenate a single stringhow to pass string in a function which is inside string concatenationstring concatconcat stringsstring concat 28string str 29concat the stringhow to concatenate a value in the string variableconcatenating string concat string with string concatenation 27 to stingconcat string toconcatenate a string basichow to join 2 string variables together javawhy can we add two stringdefine a function for concatnation of stringconcat two stringsconcatination of a stringdotnet string concatenationc 23 string concatenationconcatenate string manipulationadd strings togetherstring concatination incconcat to stringsways to concatenate a stringstrings concatenationappend two strings how to concate stringconcatenation in a stringjava combinate stringshow to concatenate string c 23add two strings togetherstring concatappend to string c 23concat values to a stringconcatenate string simple examplemerge strings togetherhow to combine seperated strings into one in javahow to concat strings and livebrake bitwin two wordshow to add two strings togetherconcatenatic stringhow to concat stringhow to merge two strings javastring concat how to add two stringsconcate string with 2cmerge 2 stringsconcatinate to stringdeclare string and concatenate with variablehow to combine the string in javastring concatenation 2b 3d net concat string with 40what is a concat stringconcat two stringwhat is str concatenationstring concatenation or string value ofconcate stringconcatenate a stringhow to combine two strings togetherwhat is concatenation of stwo stringwhat is string concatenation 3fjava put to strings together net framework concat string with 40how to add together stringshow to combine 2 stringsconcat string c 23string concat 28string str 29 3astring concateadd 2 stringsmerge two stringsconcatenate string to connect twp string javastring concatenation and 2b append 7c into stringhow do you combine 2 strings in javaconcatenate a string