How is this piece of code working? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How is this piece of code working?

Can you please help me in understanding this? //random char generator String characters="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Random random=new Random(); System.out.println(characters.charAt(random.nextInt(characters.length())));

1st Aug 2019, 12:12 PM
Sam Ir
Sam Ir - avatar
1 Answer
+ 1
~swim~ Thank you so much
2nd Aug 2019, 6:37 AM
Sam Ir
Sam Ir - avatar