Java String Formatting Java This example shows how to terminate line with String#printf() We can use %n for line termination. package com.logicbig.example.string;
public class StringFormatLineTerminate {
public static void main(String[] args) { System.out.printf("I%nlike%nmango%n"); } }
OutputI like mango
|