title: Java: How do I read 4 numbers from each line in a file. And put them into variables?
body: <p>The text file looks like this:</p>
  
  <blockquote>
    <p>data,data,data,data<br>
    data,data,data,data</p>
  </blockquote>
  
  <p>The data being numbers. 4 numbers separated by commas and about 2000 lines. However I only need to use 20 lines at a time. The starting line needs to be chosen by its number, and then it gets 19 additional lines. </p>
  
  <p>This data needs to be put into variables (float) that are named uniquely so I can then do math on them. So it can be named like this:</p>
  
  <blockquote>
    <p>DataOne1 DataOne2 DataOne3 DataOne4<br>
    DataTwo1 DataTwo2 DataTwo3 DataTwo4</p>
  </blockquote>
  
  <p>This way I can then do math like DataTwo1 - DataOne3. These variables will of course just always be named the same but then I will be able to change the underlying data by picking new lines.</p>
  
  <p>I'm sorry this is such a beginners question but I've been completely unable to put things together from different solutions to get my exact solution.</p>
  
  <p>So my question is how do I do this?</p>