Author Topic: Two arrays from one input file - Java  (Read 610 times)

Aplam

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Two arrays from one input file - Java
« on: March 30, 2019, 08:23:13 AM »
I've been trying to think of a way to do this, I really haven't had to deal with input files a lot in java so its my first time encountering this sort of problem and I can't seem to word the problem right so google hasn't been much help.

I have a file that consists of 3 columns that follows as data1 1 2 and I want to take the 2nd column into a array and the 3rd column into a different array. I thought about using string.spilt but I'm not quite so sure on how to implement it so I get two arrays.