All About Class Properties in Java

0
22
Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  


The properties class represents a set of properties. The Properties can be saved to a Stream or loaded from a stream.Each key and its corresponding value in the property list is a String.A property list can contain another property list as its default.In case to search for a key the second list is searched if the property key is not found in the original property list.
The structure of the Class Property is defined as:


public class java.util.Properties extends java.util.Hashtable{
//member element
protected properties defaults;
//A property list which contains default values for any keys not found in the current property list
//constructors
public Properties();
//creates a an empty Property list with no default values.
public Properties(Properties defaults);
//creates a an empty Property list with default values specified in the argument.
//methods:
public String getProperty(String key);
public String getProperties(string key,String defaultValue);
public void list(PrintStream out);
public void Load(InputStream in);
public void save(OutputStream out,String header);
public Enumeration PropertiesNames();
}
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

LEAVE A REPLY

Please enter your comment!
Please enter your name here