Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

What is "Properties" class in java.util do?

HI.
I would like to know what is "Properties" class in java.util do? I would like to see the example of code to show how to use the function in this class also.

Regard.
John.
0
paopeng
Asked:
paopeng
1 Solution
 
mgkCommented:
The Properties class is a hashtable for Strings, here's a really simple example:

// put values into the hashtable
Properties p=new Properties();
p.put("value1","20");
p.put("value2","40");

// get value back out
String value=p.getProperty("value1");


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now