Menu
Question Index
...

What will be the output of the following program?

public class Simple {
    public static void main(String str[]) {
        System.out.format("Total=%d%nPercent=%d%%", 300, 40);
    }
}


Total=300
Percent=40%
Total=300%nPercent=40%
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Java Formatter

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App