\nIs there any other text that goes to the next line? I can't.
java cross-platform newline eol
You can use %n
in String.format().
Calendar c = ...;
String = String.format ("Sungguk's birthday: %1$tm %1$te, %1$tY%n", c);
//^^'%n' indicates opening ^^
String2 = String.format ("%%n" is used for opening. %n");
// '%%' is used to output % ^^
// Write %n as indicated by ^^ to the next line. ^^
This is how you use it
© 2025 OneMinuteCode. All rights reserved.