generate random number based on seed value java code example Example: java random seed Random rand = new Random(System.currentTimeMillis());