aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes System.out.println problem 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 "System.out.println problem" Watch "System.out.println problem" New topic
Author

System.out.println problem

mantai sethobja
Greenhorn

Joined: Oct 02, 2007
Posts: 9
HI,

I wanted to print something like "dah!!", but System.out.println does not want to print inverted commas, it gives me an error.


SCWCD 1.5 86%<br />SCJP 1.4 70%
ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
You will have to use \" escape character, you can do something like:
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2627
    
    9

Originally posted by mantai sethobja:
HI,

I wanted to print something like "dah!!", but System.out.println does not want to print inverted commas, it gives me an error.


One easy way to do this is to add '"' in front and end of the println statement. And I don't think quotes can't be displayed as inverted commas in the console, unlike inside MS Word.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System.out.println problem