Menu
Question Index
...

What will be the output of the following program?

import java.util.Formatter;
public class Course {
    public static void main(String[] args) {
        Formatter data = new Formatter();
        data.format("course %s", "java ");
        System.out.println(data);
        data.format("tutorial %s", "Merit campus");
        System.out.println(data);
    }
}


course java
tutorial Merit campus
course java
course java tutorial Merit campus
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java Formatter Methods

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App