Menu
Question Index
...

What will be the output of the following program?

public class PrintedStatment
{
    public static void main(String args[])
    {
        System.out.print("Hello\n");
        System.out.print("Welcome\\\\n Meritcampus");
        System.out.print(" Welcome \\\\\n Meritcampus");
    }
}


Hello
Welcome\\n Meritcampus Welcome \\
Meritcampus
Hello\n
Welcome\\\\n Meritcampus
Welcome \\\\\n Meritcampus
Hello
Welcome\\n MeritcampusWelcome \
Meritcampus
Welcome\\n Meritcampus Welcome \\
Meritcampus
Hello
Compilation Error or Runtime Error

Doubts

Problems

Topic: Java String

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App