- Java.util - WeakHashMap
- Java.util - Vector
- Java.util - UUID
- Java.util - TreeSet
- Java.util - TreeMap
- Java.util - TimeZone
- Java.util - TimerTask
- Java.util - Timer
- Java.util - StringTokenizer
- Java.util - Stack
- Java.util - SimpleTimeZone
- Java.util - ServiceLoader
- Java.util - Scanner
- Java.util - ResourceBundle.Control
- Java.util - ResourceBundle
- Java.util - Random
- Java.util - PropertyResourceBundle
- Java.util - PropertyPermission
- Java.util - Properties
- Java.util - PriorityQueue
- Java.util - Observable
- Java.util - Locale
- Java.util - ListResourceBundle
- Java.util - LinkedList
- Java.util - LinkedHashSet
- Java.util - LinkedHashMap
- Java.util - IdentityHashMap
- Java.util - Hashtable
- Java.util - HashSet
- Java.util - HashMap
- Java.util - GregorianCalendar
- Java.util - Formatter
- Java.util - EnumSet
- Java.util - EnumMap
- Java.util - Dictionary
- Java.util - Date
- Java.util - Currency
- Java.util - Collections
- Java.util - Calendar
- Java.util - BitSet
- Java.util - Arrays
- Java.util - ArrayList
- Java.util - ArrayDeque
- Java.util - Home
Java.util Package Extras
- Java.util - Discussion
- Java.util - Useful Resources
- Java.util - Enumerations
- Java.util - Exceptions
- Java.util - Interfaces
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java.util.UUID Class
Introduction
The java.util.UUID class represents an immutable universally unique identifier (UUID).Following are the important points about UUID −
A UUID represents a 128-bit value.
It is used for for creating random file names, session id in web apppcation, transaction id etc.
There are four different basic types of UUIDs: time-based, DCE security, name-based, and randomly generated UUIDs.
Class declaration
Following is the declaration for java.util.UUID class −
pubpc final class UUID extends Object implements Seriapzable, Comparable<UUID>
Class constructors
Sr.No. | Constructor & Description |
---|---|
1 | UUID(long mostSigBits, long leastSigBits) This constructor constructs a new UUID using the specified data. |
Class methods
Sr.No. | Method & Description |
---|---|
1 | This method shows the clock sequence value associated with this UUID. |
2 | This method compares this UUID with the specified UUID. |
3 | This method compares this object to the specified object. |
4 | This method creates a UUID from the string standard representation. |
5 | This method returns the least significant 64 bits of this UUID s 128 bit value. |
6 | This method returns the most significant 64 bits of this UUID s 128 bit value. |
7 | This method returns a hash code for this UUID. |
8 | Static factory to retrieve a type 3(name based) UUID based on the specified byte array. |
9 | This method returns the node value associated with this UUID. |
10 | Static factory to retrieve a type 4(pseudo randomly generated) UUID. |
11 | This method returns the timestamp value associated with this UUID. |
12 | This method returns the String object representing this UUID. |
13 | This method returns the variant number associated with this UUID. |
14 | This method removes the version number associated with this UUID. |
Methods inherited
This class inherits methods from the following classes −
java.util.Object