How can I create an array of 20 random bytes in Java?
Try the Random.nextBytes method:
Random.nextBytes
byte[] b = new byte[20]; new Random().nextBytes(b);
2.1m questions
2.1m answers
60 comments
56.9k users