Read Input From User and Write to File

This code example takes input from user and write the contents of the input to a file for every time the user hits the enter key.
This is continued until the user types the word ‘finished’, then the program exists. A StringBuilder is used to check whether the word ‘finished’ has been typed in.

Search for more Java info on this site here:
Custom Search

Please type any questions here.