All About Class Dictionary in Java

0
38
Spread the love
  • 29
  • 34
  • 28
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    138
    Shares

Class Dictionary in Java
Class Dictionary in Java

The Dictionary class is the abstract parent of any class which maps keys to values like Hashtable. Any key needs to be non null object and corresponding value also needs to be non null.

The class Dictionary is described as below:


public static class java.util.Dictionary extends java.lang.Object{
//constructor
public Dictionary();//Creates a new Dictionary object.
//Methods:
public abstract Enumeration elements();
public abstract Enumeration keys();
public abstract Object get(Object key);
public abstract boolean isEmpty();
public abstract Object put(Object key,Object value);
public abstract Object remove(Object key);
public abstract int size();
}
 
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
  • 29
  • 34
  • 28
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    138
    Shares

LEAVE A REPLY

Please enter your comment!
Please enter your name here