使用UUID获取唯一的Long类型的值

277 阅读1分钟

1. 使用UUID获取唯一的Long类型的值

  1. 方法

    Long fileId = (long) Math.abs(UUID.randomUUID().hashCode());