3
Given the example.csv:
nome;idade;10;21;32;43;54
I can use the class Scanner
to read such a file. Using the method .useDelimiter()
and taking advantage of the ;
to pick up each value. So I use the .next()
to the nome
and to the idade
. For the other five values use the .nextInt()
, since they are all whole.
My question: How to ignore, for example, the first three values and take only the last two? I continue using the .nextInt()
or there is another method that helps me in this?
could use next without being int, not to convert to numeric for no reason, and just not to use the value. (taking as string practically should not have overhead) - Anyway, the split resolves more directly, as mentioned by @Articuno (but will have to convert to numeric of qq way)
– Bacco