Java-String Concatenation

String Concatenation

To join two String objects to form a new, single string you use the + operator, just as you have been doing with the argument to the println() method in the program example thus far.

Program

1

Program Source

class Javaapp {

    public static void main(String[] args) {
        
        System.out.println("hajsof"+"java"+"tutorial");
    }
}

Leave a Comment