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);
    System.out.println(f);
  }
}
Explanation
Given a String, '%S' converts it to upper case. http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback