Consider using UUID. It has much higher length than you specified, but it has a very low (like really low) probability to give you the same values in different runs. It is pretty commonly used.
More Related Contents:
- Do JSON keys need to be unique? [duplicate]
- Unique constraint with JPA and Bean Validation
- HashSet contains duplicate entries
- Assigning variables with dynamic names in Java
- Loop doesn’t see value changed by other thread without a print statement
- How do I address unchecked cast warnings?
- How do I run a Java program from the command line on Windows?
- Random weighted selection in Java
- Why is StringTokenizer deprecated?
- How to bundle a native library and a JNI library inside a JAR?
- How to implement a db listener in Java
- Limit Decimal Places in Android EditText
- Does polymorphism apply on class attributes in Java?
- MapStruct and Lombok not working together
- Java, Shifting Elements in an Array
- Observer is deprecated in Java 9. What should we use instead of it?
- Finding duplicate values in arraylist
- Algid parse error, not a sequence
- Bufferedimage resize
- Display Pdf in browser using java servlet
- Storing UUID as base64 String
- Annotation Configuration Replacement for mvc:resources – Spring
- org.apache.poi.POIXMLException: org.apache.poi.openxml4j.exceptions.InvalidFormatException:
- How to move marker along polyline using google map
- Can JAXB parse large XML files in chunks
- how calculate java array memory usage
- MultiDex NoClassDefFound error
- How do I get difference between two dates in android?, tried every thing and post
- Proguard and reflection in Android
- Is it possible to write a generic enum converter for JPA?