DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2005
    Posts
    18

    Inserting " into String

    Does any one know how i may insert the character " into a java string?

    Thanks in advance

    Dan

  2. #2
    Join Date
    Nov 2005
    Posts
    18

    Simple

    Simple in the end, a link to anyone else who's a java newbie
    http://www.samspublishing.com/articl...&seqNum=3&rl=1

  3. #3
    Join Date
    Dec 2005
    Posts
    97
    take a look at the substring method for Strings.

  4. #4
    Join Date
    Dec 2005
    Location
    New Jersey
    Posts
    290
    Quote 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 \".

  5. #5
    Join Date
    Dec 2005
    Posts
    97
    oh haha....i thought he was given a string and then wanted to insert " at a particular part. sorry

  6. #6
    Join Date
    Apr 2006
    Posts
    20
    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

  1. Input string was not in a correct format
    By mdengler in forum ASP.NET
    Replies: 0
    Last Post: 11-26-2002, 02:32 PM
  2. Replies: 1
    Last Post: 06-05-2001, 06:12 AM
  3. Please help me -- urgent -- deadlock error
    By chandra in forum VB Classic
    Replies: 0
    Last Post: 06-22-2000, 07:36 AM
  4. Replies: 0
    Last Post: 06-22-2000, 07:30 AM
  5. Database problems
    By Robert Rieth in forum VB Classic
    Replies: 1
    Last Post: 04-11-2000, 03:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links