| Free tutorials for Java, Eclipse and Web programming |
Version 0.3
Copyright © 2008 - 2010 Lars Vogel
17.01.2010
| Revision History | ||
|---|---|---|
| Revision 0.1 | 20.10.2009 | Lars Vogel |
| Splitted of from http://www.vogella.de/articles/JavaAlgorithms/article.html | ||
| Revision 0.2 | 21.10.2009 | Lars Vogel |
| Added list implementation | ||
| Revision 0.3 | 17.01.2010 | Lars Vogel |
| Removed reference to standard map in map implementation | ||
List, Map and Stack implementations in Java
This article describes how to implement data structures (List Stack, Map) in Java.
The implementations in this articles are for demonstration and education purpose. They do not try to be as efficient as the standard libraries and they are not intended to be an replacement for the standard libraries.
Table of Contents
Every programmer requires certain data structures for saving several elements. Usually every programming languages provides Arrays. These are fixed sized storage elements where every element can be addressed via an index.
The programmer usually requires a higher level of abstraction, e.g. Lists, Maps, Stacks, etc.
The Java programming language provides these elements very efficiently implemented in libraries. This article tries to describe how such elements could be implemented directly with Java constructs. The implementations in this articles are for demonstration and education purpose. They do not try to be as efficient as the standard libraries and they are not intended to be an replacement for the standard libraries.