File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 14688
    
  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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to insert double Apostrophe "" within a String