1// Import Java UUID Utils
2import java.utils.UUID;
3
4// Execute function fromString() with your string as argument.
5// Returns an uuid, which is your string converted into an UUID.
6UUID uuid = UUID.fromString(string);
1import java.utils.UUID;
2
3String strInput = "-1068942631";
4String uuidFromString = UUID.nameUUIDFromBytes( String.valueOf( strInput ).getBytes() ).toString();
5
6System.out.println(uuidFromString);