Java Developers
Group for Java developers and programmers. Ask questions and get answers related to Java programming
263 Members
Join this group to post and comment.
Information Technology
02 Feb 2019

What are different data structure in java?

The data structures provided by the Java utility package are very powerful and perform a wide range of functions. These data structures consist of the following interface and classes 

Enumeration, BitSet, Vector, Stack, Dictionary, Hashtable, Properties

All these classes are now legacy and Java-2 has introduced a new framework called Collections Framework.

The Enumeration interface is not a data structure, but it is very important within the context of other data structures. The Enumeration interface defines a means to retrieve successive elements from a data structure.

The BitSet class implements a group of bits or flags that can be set and cleared individually.

The Vector class is similar to a traditional Java array, except that it can grow as necessary to accommodate new elements. Elements of a Vector object can be accessed via an index into the vector.

The Stack class implements a last-in-first-out (LIFO) stack of elements.

The Dictionary class is an abstract class that defines a data structure for mapping keys to values.

The Hashtable class provides a means of organizing data based on some user-defined key structure.

Properties is a subclass of Hashtable. It is used to maintain lists of values in which the key is a String and the value is also a String.