Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
Created April 24, 2021 19:14
Show Gist options
  • Save sandipchitale/dea23380e67cee52183bd4bb0690963f to your computer and use it in GitHub Desktop.
Save sandipchitale/dea23380e67cee52183bd4bb0690963f to your computer and use it in GitHub Desktop.
UUIDGen #UUID
package com.example.zuuldemo;
import java.util.UUID;
import java.util.stream.IntStream;
public class UUIDGen {
public static void main(String[] args) {
IntStream.range(1, 100)
.forEach((i) -> {
System.out.println(UUID.nameUUIDFromBytes(String.valueOf(System.currentTimeMillis()).getBytes()).toString().replace("-", "") + " millis: " + System.currentTimeMillis());
}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment