Java.util Package in Java (original) (raw)
Last Updated : 12 Jun, 2024
Java.util Package
It contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
**Following are the Important Classes in Java.util package :
- AbstractCollection: This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface.
- AbstractList: This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a “random access” data store (such as an array).
- AbstractMap<K,V>: This class provides a skeletal implementation of the Map interface, to minimize the effort required to implement this interface.
- AbstractMap.SimpleEntry<K,V>: An Entry maintaining a key and a value.
- AbstractMap.SimpleImmutableEntry<K,V>: An Entry maintaining an immutable key and value.
- AbstractQueue: This class provides skeletal implementations of some Queue operations.
- AbstractSequentialList: This class provides a skeletal implementation of the List interface to minimize the effort required to implement this interface backed by a “sequential access” data store (such as a linked list).
- AbstractSet: This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
- ArrayDeque: Resizable-array implementation of the Deque interface.
- ArrayList: Resizable-array implementation of the List interface.
- Arrays: This class contains various methods for manipulating arrays (such as sorting and searching).
- BitSet: This class implements a vector of bits that grows as needed.
- Calendar: The Calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the next week.
- Collections: This class consists exclusively of static methods that operate on or return collections.
- Currency: Represents a currency.
- Date: The class Date represents a specific instant in time, with millisecond precision.
- Dictionary<K,V>: The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.
- EnumMap,V>: A specialized Map implementation for use with enum type keys.
- EnumSet: A specialized Set implementation for use with enum types.
- EventListenerProxy: An abstract wrapper class for an EventListener class which associates a set of additional parameters with the listener.
- EventObject: The root class from which all event state objects shall be derived.
- FormattableFlags: FomattableFlags are passed to the Formattable.formatTo() method and modify the output format for Formattables.
- Formatter: An interpreter for printf-style format strings.
- GregorianCalendar: GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar system used by most of the world.
- HashMap<K,V>: Hash table based implementation of the Map interface.
- HashSet: This class implements the Set interface, backed by a hash table (actually a HashMap instance).
- Hashtable<K,V>: This class implements a hash table, which maps keys to values.
- IdentityHashMap<K,V>: This class implements the Map interface with a hash table, using reference-equality in place of object-equality when comparing keys (and values).
- LinkedHashMap<K,V>: Hash table and linked list implementation of the Map interface, with predictable iteration order.
- LinkedHashSet: Hash table and linked list implementation of the Set interface, with predictable iteration order.
- LinkedList: Doubly-linked list implementation of the List and Deque interfaces.
- ListResourceBundle: ListResourceBundle is an abstract subclass of ResourceBundle that manages resources for a locale in a convenient and easy to use list.
- Locale – **Set 1, **Set 2: A Locale object represents a specific geographical, political, or cultural region.
- Locale.Builder: Builder is used to build instances of Locale from values configured by the setters.
- Objects: This class consists of static utility methods for operating on objects.
- Observable: This class represents an observable object, or “data” in the model-view paradigm.
- **PriorityQueue: An unbounded priority queue based on a priority heap.
- Properties: The Properties class represents a persistent set of properties.
- PropertyPermission: This class is for property permissions.
- PropertyResourceBundle: PropertyResourceBundle is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.
- Random: An instance of this class is used to generate a stream of pseudorandom numbers.
- ResourceBundle: Resource bundles contain locale-specific objects.
- ResourceBundle.Control: ResourceBundle.Control defines a set of callback methods that are invoked by the ResourceBundle.getBundle factory methods during the bundle loading process.
- Scanner: A simple text scanner which can parse primitive types and strings using regular expressions.
- ServiceLoader: A simple service-provider loading facility.
- SimpleTimeZone: SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.
- Stack: The Stack class represents a last-in-first-out (LIFO) stack of objects.
- StringTokenizer: The string tokenizer class allows an application to break a string into tokens.
- Timer: A facility for threads to schedule tasks for future execution in a background thread.
- TimerTask: A task that can be scheduled for one-time or repeated execution by a Timer.
- TimeZone: TimeZone represents a time zone offset, and also figures out daylight savings.
- TreeMap<K,V>: A Red-Black tree based NavigableMap implementation.
- TreeSet: A NavigableSet implementation based on a TreeMap.
- UUID: A class that represents an immutable universally unique identifier (UUID).
- Vector: The Vector class implements a growable array of objects.
- WeakHashMap<K,V>: Hash table based implementation of the Map interface, with weak keys.
Similar Reads
- Java.io Package in Java Java.io Package in JavaThis package provides for system input and output through data streams, serialization and the file system. Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. Follo 1 min read
- JEP Package Tool in Java J package tool was introduced as an incubation tool in java 14. It remained an incubation tool till java 15. It packages java applications into platform-specific features. Basically, this tool converts our java source file into an executable file. In Windows, the executable file is of two types .exe 3 min read
- Java.lang package in Java Java.lang package in JavaProvides classes that are fundamental to the design of the Java programming language. The most important classes are Object, which is the root of the class hierarchy, and Class, instances of which represent classes at run time. Following are the Important Classes in Java.lan 3 min read
- javax.xml.crypto Package in Java Common classes having the XML cryptography for the Package javax.xml.crypto. now this crypto package includes similar classes that are used to accessing XML cryptographic on its operations, such as creating an XML signature or encrypted XML data. There are two types of javax.xml.crypto classes in th 4 min read
- java.util.concurrent Package Java Concurrency package covers concurrency, multithreading, and parallelism on the Java platform. Concurrency is the ability to run several or multi programs or applications in parallel. The backbone of Java concurrency is threads (a lightweight process, which has its own files and stacks and can a 9 min read
- Java.lang.Package Class in Java In Java, the package class was introduced in JDK 1.2 to encapsulate version data associated with a package. As the number of packages increases, knowing the version of the package has become important. This versioning information is retrieved and made available by the ClassLoader instance that loade 9 min read
- Java.util.Locale Class in Java | Set 2 Java.util.Locale Class in Java | Set 1 More methods: getDisplayVariant() : java.util.Locale.getDisplayVariant() displays variant of the Locale Syntax : public final String getDisplayVariant() Parameters : ---- Return : ----------- getDisplayVariant(Locale in) : java.util.Locale.Locale in(Locale in) 3 min read
- Java.util.Locale Class in Java | Set 1 As the name suggests util.Locale Class is used to perform locale tasks and provides locale information for the user. Declaration : public final class Locale extends Object implements Cloneable, Serializable Constructors : Locale(String L): Creates Locale from the given language code.Locale(String L, 4 min read
- Java.lang.Runtime class in Java In Java, the Runtime class is used to interact with Every Java application that has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime() method. Methods of Java 6 min read
- User-Defined Packages in Java Packages in Java are a mechanism to encapsulate a group of classes, interfaces, and sub-packages. In Java, it is used for making search/locating and usage of classes, interfaces, enumerations, and annotations easier. It can be considered data encapsulation also. In other words, we can say a package 3 min read