Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
System.out.printf("%s\n", "System.out.printf("Various string formats: ");
System.out.printf("%s\n", "String Decimal; Dots Html;");

code that prints
Various string formats: String Decimal; Dots Html;
would want it to print
String Decimal
Dots Html

What I have tried:

various printf functions and changed code several times
Posted
Updated 4-Feb-18 1:35am
Comments
Richard MacCutchan 4-Feb-18 7:59am    
You could easily find the answer by reading the documentation.

1 solution

Try:
System.out.printf("%s\n", "String Decimal\nDots Html");
 
Share this answer
 
Comments
four systems 4-Feb-18 7:43am    
thanks
OriginalGriff 4-Feb-18 8:28am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900