Oh wow I'm mad that it does already. I didn't even notice. I added another counter variable and the code runs perfectly now. Thanks a lot bro. Much love.
Type: Posts; User: iAce
Oh wow I'm mad that it does already. I didn't even notice. I added another counter variable and the code runs perfectly now. Thanks a lot bro. Much love.
I meant like how can I make it so that each line can be read one at a time to determine if it is equal to BB, BG, GB, or GG. I don't know how to do that.
And that's another problem I have. I don't...
In Step 3, I know I'm using Scanner inFile = new Scanner(new File("test1.txt")); to read the text file while the while loop is going. It will terminate after the last line is read.
My problem is...
Thanks for the reply. Usually the errors are just variables that I haven't declared yet. Here are the things I need to code this program correctly (I think).
(1) Declare all variables.
(2) Declare...
I'm a beginner coder in Java and I'm confused about how to code this one assignment I have. If I can get any help, then it would be fantastic. :)
I am using BlueJ.
Assignment:
Write a program...