Series: Legacy

Java JDK 1.0 Legacy data structures explained in simple terms

Collections Hierarchy Java

After knowing the meaning and purpose of Collections framework, let us know the basic interfaces, derived classes and their properties. Java data structures are nothing but subclasses of Collection and Map interfaces. Following hierarchy gives all the interfaces of Collections framework. Fig: Basic interfaces of collections framework Map and SortedMap form a separate hierarchy and …

Collections Hierarchy Java Read More »

Java Interface Collection

Java Interface Collection Summary: Java Interface Collection is the super most interface from which almost all DS are derived. Explained the API in simple terms for a very beginner. Collection interface forms the base from which many data structures (almost all) are derived. The data structures derived from Collection interface are known as collections framework. …

Java Interface Collection Read More »

Java Generics Stack Example

Java Generics Stack Example: The following program creates generics stacks storing all ints, doubles, chars and strings. Java 5 enhanced for loop is used to print the elements. Two Java Generics Stack Examples are given on Java Generics Stack. First one is general stack storing any data types. The methods push, peek, pop, size etc. …

Java Generics Stack Example Read More »

Java Vector Methods

Java Vector Methods Summary: The most used DS is Vector. Developer is required thorough with all the Java Vector Methods. Be comfortable to go through the tutorial. class Vector Vector internally is a array-based data structure (linked list is node-based) and grows dynamically when more elements are . Usage of Vector Constructors – Internal mechanism …

Java Vector Methods Read More »

Java Vector Generics Example

Java Vector Generics Example: About class Vector, its constructors and methods are explained very elaborately in the first program (and is advised to read before this program) Vector – Methods. Four Java Vector Generics Examples are given on Vector to know thoroughly about Vector, methods and usage. Vector is a general purpose data structure used …

Java Vector Generics Example Read More »

Vector Example Special Operations

Four programs are given on Vector to know thoroughly about Vector, methods and usage. Vector is a general purpose data structure used very often by the programmer even though the collections framework comes with many classes. Vector – Methods: Uses all the methods of Vector class like capacity, size, firstElement etc. Generics Vector: Create generics …

Vector Example Special Operations Read More »

Java Hashtable Program

Java Hashtable Program Summary: By the end of this tutorial "Java Hashtable Program", you will comfortable to write a program. Explained in simple terms with screenshot. Three Java Hashtable Programs are given. HashtableGeneral: Uses the methods like elements, containsKey, put, get, contains and keys. Hashtable Generics: Creates generics Hashtable storing strings and integers and uses …

Java Hashtable Program Read More »

Generics Hashtable

Three programs are given on Hashtable. Hashtable General: Uses the methods like elements, containsKey, put, get, contains and keys. Hashtable Generics: Creates generics Hashtable storing strings and integers and uses the methods like keySet, values, hashCode, putAll, clear, size, iterator, remove and isempty etc. Hashtable Special: Uses the methods like clone(), hashCode() and the values …

Generics Hashtable Read More »

Hashtable Hash Code Example

Three programs are given on Hashtable. Hashtable General: Uses the methods like elements, containsKey, put, get, contains and keys. Hashtable Generics: Creates generics Hashtable storing strings and integers and uses the methods like keySet, values, hashCode, putAll, clear, size, iterator, remove and isempty etc. Hashtable Special: Uses the methods like clone(), hashCode() and the values …

Hashtable Hash Code Example Read More »

Properties Java

We know earlier Hashtable stores key/value pairs. There exists one more similar data structure that stores key/value pairs – Properties. Infact, Properties is derived from Hashtable. They differ very slightly. The key/value pair in Hasahtable can be objects of any Java class. But incase of Properties, the key/value pair should be strings only. Following is …

Properties Java Read More »