I need to separate the characters of a string into numbers and letters.
Ex:
Entry:
"A1B2C3D2Z9"
Output:
List<Character> numeros = { '1','2', '3' }
List<Character> letras = { 'A', 'B', 'C' }
I use a for
to go through string
, but I do not know how to identify in the condition that it checks whether the position of the string is a number or a letter.
Does anyone know how I can do this conditional test?