How do I use comma as part of the value in a properties file

Posted on 2007-08-03
Last Modified: 2013-11-05
I am having a comma in the value of property file(.properties). I am using java.util.Properties to get key and value.
for eg address=123,ABC Street
Here "123,ABC Street " should be the value. But I am not able to use a escape character for comma
Tried placing in double quotes and using back slash before comma.
Is there a way to use comma in the value
Question by:karthik_cs
    LVL 86

    Accepted Solution

    IIRC you don't need to do anything. Use the comma directly

    Author Comment

    Then it would give me 123 and ABC Street as two values. Is there a way to get "123, ABC Street" as one value
    LVL 86

    Expert Comment


    >>Then it would give me 123 and ABC Street as two values
    No - as one value

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now