Menu
Question Index
...

Which of the following is incorrect?

public class PrintStatements
{
    public static void main(String[] args)
    {
        String str = "Hai friend how are you";
        System.out.print(str); //LINE 1
        System.out.println(); //LINE 2
        System.out.printf(str, str); //LINE 3
        System.out.format(str, str); //LINE 4
    }
}


LINE 1, LINE 3 and LINE 4
LINE 3 and LINE 4
LINE 3 only
LINE 4 only
All of them are correct

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App