
Resource:
- "Demonstrate the Coding to Produce Output to a File" text file
For this assignment, you will analyze Java™ that presents instructional text on the console, accepts user input, and then creates a file based on that user input.
Read the linked Java™ code carefully.
Then, answer the following questions in a Microsoft® Word file:
- As you run the program in NetBeans the first time, at the prompt (the program will pause for input) type abc Return def Return ghi Ctrl+Shift+Del. What is the result?
- As you run the program in NetBeans the second time, at the prompt (the program will pause for input) type 123 Ctrl+Shift +Del. What is the result?
- What happens if the file Data.txt already exists when you run the program?
- What happens if the file Data.txt does not already exist when you run the program?
Submit your Word file to the Assignment Files tab.
Questions & Answers
Have a Question?
Be the first to ask a question about this.