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
3 odpowiedzi
+ 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);
+ 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.
+ 1
Julien Quentin Thanks for your input I will make some changes.