Menu
Question Index
...

What will be the output of the following program?

public class Test {
    public static void main(String[] args) {
        int marks = 72;
        float percentage = 72f;
        Boolean status = (marks >= 70);
        System.out.printf("Pass %b%npercentage %f", status, percentage);
    }
}


Pass true
percentage 72.000000
Pass true
percentage 72.0
Compilation Error
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