Question: Java: How to turn buffered reader to string to a variable? So far, I turned them into numbers 0 ,1 ,2, 3 in print out.
Java: How to turn buffered reader to string to a variable? So far, I turned them into numbers 0 ,1 ,2, 3 in print out. In the console I have them 0,1,2,3 how can I turn them into variables so I can use them. I want to turn them into variables so I can use them into arrays by getting each different array. For example, zeroArray will have all 0's, oneArray will have 1's, twoArray will have 2's.. Please help me out.


Here is the list of data.
https://pastebin.com/45MhKG9z
@Override public void start (Stage stage) { string str ; String[] splited-new String[str.length)]; int p -0 try FileReader fr - new FileReader("TVCharacters.txt") BufferedReader br-new BufferedReader(fr); while ((str = br. readLine()) != null) { fortentistespitsplited.length; H) { p-i; System.out.println (splited[i] +""+ p); br.close); catch (IOException e) ( System.out.println("File not found"); System.out.println(p); Console 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
