Menu
Question Index
...

What will be the output of the following program?

class StringExample {
    public static void main(String args[])
    {
        String s1 = "Java";
        String s2 = "Professional";
        System.out.println(s1.concat(" * ").concat(s2));
    }
}


Java Professional
Java * Professional
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java String concatenation - concat() Method In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App