+ 2
how i can convert Array List Path to ArrayList String
of: List<Path> paths = new ArrayList<>(); to: List<String> lineas = new ArrayList<>();
1 Respuesta
+ 10
You could do something like that:
List<String> lineas = paths
.stream()
.map(p -> p.toString())
.collect(Collectors.toList());
Make sure the toString representation is the string you want. If not, use the File class: p.toFile().getPath(), getAbsolutePath(), (...).