How would you get the next letter in String form from a buffered reader?
I need to loop through a String with a Buffered Reader to check each character in a while loop. I need to see if there’s a character ahead before doing the while loop while still saving the character for use in the loop. I’m currently using the buffered reader’s read() that returns a char which I will then convert into a string inside the loop. There’s a line that has an error, the line is labeled in the code. The errors are: “The operator != is undefined for the argument type(s) char, null” and “Type mismatch: cannot convert from String to char” on the same line. Here’s the problematic code.