Concatenate strings in Java



examples/java/ConcatStrings.java
public class ConcatStrings {
    public static void main(String[] args) {
        String h = "Hello";
        String w = "World";
        String full = h + " " + w;
        System.out.println(full);  // Hello World
    }
}

$ javac ConcatStrings.java
$ java ConcatStrings