Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

wangming / kzy-oss

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • kzy-oss
  • ..
  • utils
  • RandomUtils.java
  • wangming's avatar
    初始化 · 1a95d4a7
    wangming committed Mar 12, 2020
    1a95d4a7
RandomUtils.java 327 Bytes
BlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package com.server.utils;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @author ZMS
 */
public final class RandomUtils {

    public static int random(int i) {
        return ThreadLocalRandom.current().nextInt(i);
    }

    public static int random() {
        return ThreadLocalRandom.current().nextInt();
    }
}