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.

Java: How to turn buffered reader to string to a variable? So

far, I turned them into numbers 0 ,1 ,2, 3 in print

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 TVCharacterTableTester [Java Application] C: 04/01/1975 2 Brady Bunch 3 Alice 0 Nelson1 08/01/1945 2 Brady Bunch 3 Tiger e Brady 1 04/01/1976 2 Brady Bunch 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!