Helpful Information
 
 
Category: Java and JSP
question about java

what is meaning of using:
\f or form feed
and:
\r or carriage return?

I don't know if you would need them in code but they can be used for comparison with user input.


Jason

we know that we can use special characters with the strings for many purpose like \n for new line, my question was: what for we use \f and \r?

If you're writing to a printer then \f should exject the current page and \r allows overtyping. They were a lot more important in the past when much output was designed for paper and printers weren't graphic so to get underlined text you had to type the text, and then go back and type the underline separately.

If you're writing to a printer then \f should exject the current page
i didn't understand the meaning of exject?

Typo, exject should be eject. That is it stops printing on the current piece of paper and feeds in the next page.










privacy (GDPR)