File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes use of '\f' ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "use of Watch "use of New topic

use of '\f' ?

Ken Ng

Joined: Feb 14, 2004
Posts: 26
hi all,
Can anybody explain what exactly is '\f' (form feed).
What practical situations do we use it?
How to use it? Care to give some examples
Thank for the ans.
Howard Kushner
Ranch Hand

Joined: Sep 19, 2003
Posts: 361
Sure. When used in a string that will be directed to a printer, it causes the succeeding output to begin on a new page, so it is like a page eject. It instructs the printer to begin the next output on a new page even if the previous page is not yet completely full. Does that help.?
For example:
will print ABC on the first line, DEF one the second line, GHI on the third line, and XYZ at the top of the next page.


Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
I agree. Here's the link:
subject: use of '\f' ?
jQuery in Action, 3rd edition