0

Create Random Alphanumeric Cha

Hi, Is there a way to generate alphanumeric characters of a certain size and add them to the string array and get each created by index number or add them to an ArrayList? I tried the below code but it not working. Is there a solution? https://code.sololearn.com/cqyUYaZTi5B4/?ref=app

23rd Nov 2018, 9:58 AM
Sibusiso Mbambo
3 ответов
+ 6
So are you wanting to build a random alphanumeric string of size and find the position specific character? Theres a method called indexOf("letter"); which will give you the position if that helps?. heres an example System.out.print("hello".indexOf("o")+1);
23rd Nov 2018, 11:01 AM
D_Stark
D_Stark - avatar
+ 3
D_Stark thanks for your answer. What I want is to create random alphanumeric string array like {hdy276HFvD, ghdYE63bdj, IDBvdj393g} but not a single string. The alphanumeric created can also be added to ArrayList.
23rd Nov 2018, 11:09 AM
Sibusiso Mbambo
+ 1
Julien Quentin Thanks for your input I will make some changes.
23rd Nov 2018, 11:35 AM
Sibusiso Mbambo