This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to insert double Apostrophe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to insert double Apostrophe "" within a String" Watch "How to insert double Apostrophe "" within a String" New topic
Author

How to insert double Apostrophe "" within a String

Aditya Sirohi
Ranch Hand

Joined: Jan 05, 2010
Posts: 93


I have a logic where i need to replace a String of characters with "Y". So for example, the input file is:-




the output should be:-



But in my case the output is as below. What do i need to display letter Y in double apostrophe("").



This is the line of code that does the following computation:-


Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Escape the double quotations :


[My Blog]
All roads lead to JavaRanch
Aditya Sirohi
Ranch Hand

Joined: Jan 05, 2010
Posts: 93

Thanks Christophe. I had tried everything except this.
 
wood burning stoves
 
subject: How to insert double Apostrophe "" within a String
 
Similar Threads
JMX sample code
remote debug of weblogic cluster
Issue with the scanner class.
Need some Thinking(JSP and XML)
retain apostrophe in Collection object