N
var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
console.log(res);
N
x = ‘apples’
y = ‘lemons’
z = “In the basket are %s and %s” % (x,y)
N
// String concatenation in java using concat() method
public class StringConcatMethodDemo
{
public static void main(String[] args)
{
String str1 = "Flower ";
String str2 = "Brackets";
String str3 = str1.concat(str2);
System.out.println(str3);
}
}
N
the process of adding strings / chars together to make a larger string
ie:
String str = "cat";
Char letter = 's';
String newWord = str + letter;
==> newWord == "cats"
N
//Java
String firstName = "BarackObama";
String lastName = " Care";
//First way
System.out.println(firstName + lastName);
//Second way
String name = firstName + lastName;
System.out.println(name);
//Third way
System.out.println("BarackObama" + " Care");
N
x="String"
y="Python"
d="+"
c = "We can concatenation " + y + x + "with" + d + "Operator"
print(c)