0

I do not want to repeat every time system.out.print. Is it possible to reapeat one time??Thank you

https://code.sololearn.com/cx1GY1u3WT5h/?ref=app

19th Nov 2020, 4:29 AM
yaser
yaser - avatar
3 Réponses
+ 2
System.out.println(result+"\n"+result1+"\n"+result2)
19th Nov 2020, 4:36 AM
Vadivelan
0
thank you so much
19th Nov 2020, 4:38 AM
yaser
yaser - avatar
0
You can also use String.format() System.out.println(String.format("%d\n%d\n%d", result, result1, result2)); https://www.google.com/amp/s/www.geeksforgeeks.org/java-string-format-examples/amp/ https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#format(java.lang.String,%20java.lang.Object...)
19th Nov 2020, 4:52 AM
ChaoticDawg
ChaoticDawg - avatar