Java String Formatting Java
This example shows how to capitalize strings with String#printf()
String#printf()
We use %S for capitalization.
package com.logicbig.example.string;public class StringPrintfCapitalization { public static void main(String[] args) { System.out.printf("%S%n", "hello there!"); System.out.printf("%S = %s%n", "x", 5); }}
HELLO THERE!X = 5