Answers for "concat 2 strings"

3

js concatenate strings

const str1 = 'Hello';
const str2 = 'World';

console.log(str1 + str2);
>> HelloWorld

console.log(str1 + ' ' + str2);
>> Hello World
Posted by: Guest on October-22-2020
1

how add strings together

//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");
Posted by: Guest on May-14-2020
0

concat no and string in javascript

['Hello', ' ', 'World'].join(''); // 'Hello World'
Posted by: Guest on August-18-2020
-1

string concatenation js

var aString="";
aString.concat(value1, value2, ... value_n);
Posted by: Guest on March-21-2020
0

how do you combine 2 strings

-By  using (+) operator
-By  using concatenate method (concat()).
                      String strconcat3=strconcat2.concat(strconcat);

-By StringBuffer
-String strconcat= new StringBuilder().append("matt")
                                .append("damon").toString();
                                
-By StringBuilder
- String strconcat2= new StringBuffer()
                  .append("matt").append("damon").toString();
Posted by: Guest on January-14-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language