Answers for "how to add strings"

7

python add strings

var1 = "foo"
var2 = "bar"
var3 = var1 + var2
Posted by: Guest on December-26-2020
6

java concatenate strings

public class Concat {
    String cat(String a, String b) {
        a += b;
        return a;
    }
}
Posted by: Guest on June-29-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

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language