The String line is declared outside of the while loop. Use that as an example of how to declare variables outside of the loop.

Please edit the code and add indentations for nested statements to...