java random seed

Java
Random rand = new Random(System.currentTimeMillis());
Source

Also in Java: