Dictionary Properties Concurrent Classes in Java
Dictionary Properties Concurrent Classes in Java
=> Dictionary :-
Dictionary is an abstract class which is present
in java.util package
Dictionary represents the key-value pair similar
to Map interface
Syntax : public abstract class Dictionary { - }
As Dictionary is an abstract class, thus we
cannot create an object of it
Methods :-
1. abstract public int size();
2. abstract public boolean isEmpty();
3. abstract public Enumeration keys();
4. abstract public Enumeration elements();
5. abstract public Object get(Object key);
6. abstract public Object put(Object key, Object
value);
7. abstract public Object remove(Object key);
1
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308
=> Properties :-
Properties is the child class of Hashtable which
is present in java.util package
Syntax : public class Properties extends
Hashtable { - }
Properties is the file which stores the data in
key-value pair
Properties can contain "key-value pair in the
form of String type only"
2
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308
Constructors :-
1. public Properties() { - }
2. public Properties(Properties defaults) { - }
Methods :-
1. void load(InputStream is)
2. String getProperty(String pname)
3. String setProperty(String pname, pvalue);
4. void store(OutputStream os, String comments)
3
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308
4
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308
5
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308
6
Smart Programming (Mohali, Chandigarh India)
Call or Whats App Online & Industrial Training: +91 62838-30308
Websites: https://www.smartprogramming.in/
https://courses.smartprogramming.in
Android App:
https://play.google.com/store/apps/details?id=com.sma
rtprogramming
YouTube Channel:
https://www.youtube.com/c/SmartProgramming