File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.out.println problem

 
mantai sethobja
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I wanted to print something like "dah!!", but System.out.println does not want to print inverted commas, it gives me an error.
 
ahmed yehia
Ranch Hand
Posts: 424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to use \" escape character, you can do something like:
 
K. Tsang
Bartender
Pie
Posts: 3222
12
Android Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic