1
I am trying to split a string using the following character "|" But java is understood to divide letter by letter.
List<Curso> cursos = new ArrayList<Curso>();
List<String> pacotes = Arrays.asList("Criança-1,2,3-1,00|Preparatório Primeiro Emprego-4,5,6,7,8,9-139,99".split("|"));
System.out.println(pacotes.toString()); //I/System.out: [, C, r, i, a, n, ç, a, -, 1, ,, 2, ,, 3, -, 1, ,, 0, 0, |, P, r, e, p, a, r, a, t, ó, r, i, o, , P, r, i, m, e, i, r, o, , E, m, p, r, e, g, o, -, 4, ,, 5, ,, 6, ,, 7, ,, 8, ,, 9, -, 1, 3, 9, ,, 9, 9]
Can someone help me?
Thanks Amigo!
– DaviDEV