Java Software Solutions >EX2.5 > Solution

Problem:

What is the output produced by the following statement? Explain.
System.out.println ("He thrusts his fists\n\tagainst" +
" the post\nand still insists\n\the sees the \"ghost\"");

Output:

Not Applicable

Solution:

The output produced is:
He thrusts his fists
 against the post
 and still insists
 he sees the "ghost"

Escape characters are used to go to the beginning of new lines (\n), to tab (\t), and to print quotation marks (\").


No comments :

Post a Comment

Follow Me

If you like our content, feel free to follow me to stay updated.

Subscribe

Enter your email address:

We hate spam as much as you do.

Upload Material

Got an exam, project, tutorial video, exercise, solutions, unsolved problem, question, solution manual? We are open to any coding material. Why not upload?

Upload

Copyright © 2012 - 2014 Java Problems  --  About  --  Attribution  --  Privacy Policy  --  Terms of Use  --  Contact