Question: Hello i need help with my code in Java...for some reason my code is only printing out the ello with a few lines. I was

Hello i need help with my code in Java...for some reason my code is only printing out the "ello" with a few lines. I was wondering if you can help fix the code below to display the correct output.
Hello i need help with my code in Java...for some reason my
code is only printing out the "ello" with a few lines. I
was wondering if you can help fix the code below to display
Current output:
the correct output. Current output: Needs to ouput: Ps: my .txt file
Needs to ouput:
is correct public void nextCharO throws IOException \{ If This will read
Ps: my .txt file is correct

public void nextCharO throws IOException \{ If This will read the next character in the input file int mod= reader, read(); if (mod=0){ /1 This is my end of file reach currentChar =10; \} elsef currentChar =( char ) mod; currentColumn++; if (currentChar = ' ) \{ I/ When we encounter a new line character currentlinet+; currentColumn =0; 3 \} //This will read the current character as a string public String currentChar() \{ if (currentChar =\8 ) \{ return "end-of-text"; \} else \{ return'Character, tostring(currentChar); \} \} I This will return the current line and the current column as a string public String positionO \{ return currentline +":"+ currentColumn; \} \} Hello.txt 1:1e 1:21 1:31 Enter ftlename (or 'exit' or "quit' to quit): The reader should produce the following output: 1:1H1:2e1:311:411:502:02:1C2:202:3S2:4C2:52:642:752:852:9I

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!