aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes printf formatting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "printf formatting" Watch "printf formatting" New topic
Author

printf formatting

O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

In the following line of code



What is does the %n mean?

I saw the above example in code examples in http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Tech/Chapter05/formatterPrintf.html
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19066
    
  40

It's all explained, in the JavaDoc of the java.util.Formatter class, which is the class that is used to format the text.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
John Stark
Ranch Hand

Joined: Jul 19, 2011
Posts: 185
I think it prints a newline.

John
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: printf formatting