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 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "" within String" Watch "" within String" New topic
Author

" within String

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
I want to use " into String-values:

String a = " he"llo" "

is this the right form:

String a = " he'llo' "
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
String a = " he\"llo\" ";

The above will work.


Life called,so here I am.<br />Cheers<br />Niki.:-)
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

nimo frey wrote:

is this the right form:

String a = " he'llo' "


No, but we have escape sequence to resuce.

So, "he\"llo\"" will work ! Use escape sequence to get there actual meaning in any stream.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
thanks
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: " within String