Answers for "string.Concat"

12

string concatenation in js

var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
console.log(res);
Posted by: Guest on April-28-2020
4

string concat in java

public class ConcatenationExample {
   public static void main(String args[]) {
       //One way of doing concatenation
       String str1 = "Welcome";
       str1 = str1.concat(" to ");
       str1 = str1.concat(" String handling ");
       System.out.println(str1);

       //Other way of doing concatenation in one line
       String str2 = "This";
       str2 = str2.concat(" is").concat(" just a").concat(" String");
       System.out.println(str2);
   }
}
Posted by: Guest on November-07-2020
2

javascript string concat vs +

It is strongly recommended to use the string
concatenationoperators (+, +=) instead of String.concat
method for perfomance reasons
Posted by: Guest on May-23-2020
0

String Concatenation

String firstName = "John ";
String lastName = "Doe";
System.out.println(firstName.concat(lastName));
Posted by: Guest on October-15-2021
-1

concatenate a string

let myPet = 'seahorse';console.log('My favorite animal is the ' + myPet + '.'); // My favorite animal is the seahorse.
Posted by: Guest on May-30-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language