I am a beginner of java...
Does anyone know how to extract items from a string??
String region = "USA,JAPAN,RUSSIA"
And finally store in ArrayList <String>list
:):):):):):) Thanks so much
Printable View
I am a beginner of java...
Does anyone know how to extract items from a string??
String region = "USA,JAPAN,RUSSIA"
And finally store in ArrayList <String>list
:):):):):):) Thanks so much
The String#split(String regex) method can split the String on whatever you'd like (here, I'd split it on the "," comma), and place the results in an array. Please look at the API for more detail: String#split API
Thanks Fubarable, it works now