import java.util.UUID; public class UIDGenerator { public static String generateUID() { return UUID.randomUUID().toString(); } public static String generateC16UID() { String C36UUID = UUID.randomUUID().toString(); String C16 = C36UUID.replaceAll("-", ""); return C16.substring(0, 16); } }