Choose the correct result of compiling and running following code:

import java.util.Formatter;
public class Format2 {
  public static void main(String[] args) {
    String s = "hello123";
    Formatter f = new Formatter();
    f.format("%S", s);
Given a String, '%S' converts it to upper case.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Sign Up Now
or Subscribe for future quizzes