Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Can keys on Properties have quotes?

Posted on 2007-10-08
2
Medium Priority
?
214 Views
Last Modified: 2010-03-30
Hi,
Can keys on Properties file have quotes?
i.e.
String "font type"=Some font type

Thanks
Jamie
0
Comment
Question by:jamie_lynn
2 Comments
 
LVL 92

Expert Comment

by:objects
ID: 20037900
i don't think so.
try it out, you may need to quote them \"
0
 
LVL 8

Accepted Solution

by:
malfunction84 earned 2000 total points
ID: 20038510
Yes, they can.  If your .properties file has something like this:

"test"=it worked

...you can retrieve the value with this...

Properties prop;
// read in the .properties file
System.out.println(prop.getProperty("\"test\"")); //prints "it worked"
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

578 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