-
Inserting " into String
Does any one know how i may insert the character " into a java string?
Thanks in advance
Dan
-
Simple
Simple in the end, a link to anyone else who's a java newbie
http://www.samspublishing.com/articl...&seqNum=3&rl=1
-
take a look at the substring method for Strings.
-
 Originally Posted by anubis
take a look at the substring method for Strings.
What? The OP wanted to use the " character in Strings, which can be accomplished using the escape sequence \".
-
oh haha....i thought he was given a string and then wanted to insert " at a particular part. sorry
-
Indeed, using the escape character \ will allow you to insert a character that would normally be, for want of a better word, illegal.
If only I'd known this sooner myself, a lot of my strings in coursework pieces, especially text-based RPG's use single quotes (') to designate speech, and it looks untidy!
Similar Threads
-
By mdengler in forum ASP.NET
Replies: 0
Last Post: 11-26-2002, 03:32 PM
-
By Fred Mayes in forum Java
Replies: 1
Last Post: 06-05-2001, 06:12 AM
-
By chandra in forum VB Classic
Replies: 0
Last Post: 06-22-2000, 07:36 AM
-
By Chandra in forum VB Classic
Replies: 0
Last Post: 06-22-2000, 07:30 AM
-
By Robert Rieth in forum VB Classic
Replies: 1
Last Post: 04-11-2000, 03:21 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|