wait random time java code example Example: wait random time java Thread.sleep((long)(Math.random() * 1000));