precision modifier: Display at most 15 characters in a string
import java.util.Formatter; public class MainClass { public static void main(String args[]) { Formatter fmt = new Formatter(); fmt.format("%.15s", "Formatting with Java is now easy."); System.out.println(fmt); } } //Formatting with