UUID / GUID (Universally / Globally Unique Identifier) is frequently use in programming. Some of its usage are for creating random file names, session id in web application, transaction id and for record’s primary keys in database replacing the sequence or auto generated number.
Nov 12, 2015 I wanted to use SQLite as an object relational model (ORM) database for a Spring Hibernate Java application.It turned out to be relatively simple to achieve. This post shows a simple example illustrating the project configuration, SQLite table creation, Java object definition, saving and retrieving a Java object into/from the database.
![Generate Generate](/uploads/1/2/5/8/125870899/748979623.png)
![Kotlin Kotlin](/uploads/1/2/5/8/125870899/246221723.png)
To generate UUID in Java we can use the
java.util.UUID
class. This class was introduced in JDK 1.5. The UUID.randomUUID()
method return a UUID object. To obtain the value of the random string generated we need to call the UUID.toString()
method.Generate License Key Using Kotlin Free
We can also get the version and the variant of the UUID using the
version()
method and variant()
method respectively. Let’s see the code snippet below:Generate License Key Using Kotlin Tutorial
The result of our program is:
License Key Fivem
- How do I backup MySQL databases in Ubuntu? - December 16, 2019
- How do I set the time of java.util.Date instance to 00:00:00? - October 24, 2019
- How to Install Consolas Font in Mac OS X? - March 29, 2019