Question: Write a program that allows the user to enter lines of data. Each line of data is appended to a StringBuilder object. When the user

Write a program that allows the user to enter lines of data. Each line of data is appended to a StringBuilder object. When the user indicates they are done by typing QUIT on a line by itself, the data is saved to a file using a PrintWriter object. Sample file run: Enter your data to save to a file. Type QUIT when done. This is my data. This is more data. This is still more data. QUIT Save your data to what filename? data.txt Data saved to data.txt Done.
 Write a program that allows the user to enter lines of

Write a program that allows the user to enter lines of data. Each line of data is appended to a StringBuilder object. When the user indicates they are done by typing QUIT on a line by itself, the data is saved to a file using a PrintWriter object. Sample file run: Enter your data to save to a file. Type QUIT when done. This is my data. This is more data. This is still more data. QUIT Save your data to what filename? data.txt Data saved to data.txt Done

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!