Is there a block of Java UUID that won’t automatically generated? I would like to define an easy to remember guid inside of my code that will act as a constant. Something like a null?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think that you want is the static method
UUID.fromString(String), where the string is a UUID string that you generated previously.You could also use the null GUID suggested by David Heffernan, either in string form, or constructed using
new UUID(0L, 0L).