Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. for(int r = 0; r < 303; r++){
  2. String s = file.nextLine();
  3. s = s.replaceAll(" ", ""); //attempt to remove whitespace
  4. str_arr = s.split(",");
  5.  
  6. for(int c = 0; c < 6; c++){
  7. str_arr[c] = str_arr[c].strip(); //2nd attempt
  8. System.out.println(str_arr[c]); //here it just prints the
  9. number 64 with a space in
  10. front of it
  11. data_set[r][c] = Integer.parseInt(str_arr[c]);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement