Calendar - sample program in Java
The abstract Calendar class provides a set of methods that allows you to convert a time in milliseconds to a number of useful components. Some examples of the type of information t
Read tutorialTHE TUTORIAL LIBRARY
The abstract Calendar class provides a set of methods that allows you to convert a time in milliseconds to a number of useful components. Some examples of the type of information t
Read tutorialA BitSet class creates a special type of array that holds bit values. This array can increase in size as needed. This makes it similar to a vector of bits. The BitSet constructors
Read tutorialOne of the most useful aspects of Properties is that the information contained in a Properties object can be easily stored to or loaded from disk with the store() and load() method
Read tutorialProperties 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. The Properties class is used by many othe
Read tutorialHashtable was part of the original java.util and is a concrete implementation of a Dictionary. However, Java 2 reengineered Hashtable so that it also implements the Map interface.
Read tutorialStack is a subclass of Vector that implements a standard last-in, first-out stack. Stack only defines the default constructor, which creates an empty stack. Stack includes all the
Read tutorialVector implements a dynamic array. It is similar to ArrayList, but with two differences: Vector is synchronized, and it contains many legacy methods that are not part of the collec
Read tutorialJava 2 added a new class to java.util called Arrays. This class provides various methods that are useful when working with arrays. Although these methods technically aren't part of
Read tutorialThe following is an example that demonstrates the power of a custom comparator. It implements the compare() method so that it operates in reverse of normal. Thus, it causes a tree
Read tutorialThe TreeMap class implements the Map interface by using a tree. A TreeMap provides an efficient means of storing key/value pairs in sorted order, and allows rapid retrieval. You sh
Read tutorialThe HashMap class uses a hash table to implement the Map interface. This allows the execution time of basic operations, such as get() and put(), to remain constant even for large s
Read tutorialBefore you can access a collection through an iterator, you must obtain one. Each of thecollection classes provides an iterator() method that returns an iterator to the start of th
Read tutorialOne example today. A better developer tomorrow.