Good day,
I have this exercise I need to do in Java. I've got a text file containing hundreds of lines each of which also has information separated by ";". What I need is to get a list of strings which are splitted by ";".
Path filePath = Paths.get("file.txt);
List<String> lines = Files.readAllLines(filePath);
List<String> linesSplit = lines.split(";");
First two lines went just fine, but in the third one "split" is red. Apparently I still don't understand correctly how .split() method works. Would anyone show me the way?