2.4 Displaying Text with printf
The System.out.printf method (f
means “formatted”) displays formatted data. Figure 2.6 uses this method to output on two lines the strings "Welcome to"
and "Java Programming!"
.
Welcome toJava Programming!
Lines 9–10 ...
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.