Question: This should be a java code I have the following data from my text file: Tile 1: B,B,Y,O,P,G Tile 2: O,B,G,Y,P,Y Tile 3: P,G,B,R,B,Y Tile

This should be a java code

I have the following data from my text file:

Tile 1: B,B,Y,O,P,G Tile 2: O,B,G,Y,P,Y Tile 3: P,G,B,R,B,Y Tile 4: O,B,P,O,Y,G Tile 5: O,R,O,B,P,R

Tile 6: R,Y,R,O,P,B Tile 7: O,G,R,O,G,G

I want to create non-static read method that can read the characters from my file.

I am using the following to begin reading the data where the path is the string name of my file:

DataInputStream input = new DataInputStream(new BufferedInputStream(new FileInputStream(path)));

I do not want to read "Tile #:" I only need to read the characters. I know that I can just erase the Tile #: portion but future inputs will always follow this format

so I need my read method to be selective on what is read and what is not read. I want my read method to read the list not the title of the list. The read method will then put each list into different separate character arrays. Can you write this code for java?

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!