Task: Text IO Perform the followings in a main() method. Use the try-with-resources syntax. • • Output the following numbers to a file named "textlO.txt": 25 71 70 99 63 4 10 20 52 75 59 85 64 8 59 69 73 71 73 70 27 77 64 77 94 19 57 59 63 17 97 83 81 57 60 21 93 59 62 63 34 47 79 81 59 77 39 37 79 73 47 10 16 90 33 75 74 96 12 25 61 23 58 40 54 88 43 94 90 8 45 38 78 5 65 89 98 49 51 88 46 84 19 47 60 95 7 26 87 54 85 27 64 81 31 87 49 10 29 70. Your program should check if the file exists. If not, your program will create the file. You can output the numbers all together as a String (copy and paste the numbers into your program). Read the numbers back from the file, compute their total, and appends the total to the end of the file in a new line. Note appending means the original numbers should not be deleted or replaced. The file should have the following content after your program is executed: text10.txt 25 71 70 99 63 4 10 20 52 75 59 85 64 8 59 69 73 71 73 70 27 77 64 77 94 19 57 59 63 17 97 83 81 57 60 21 93 59 62 63 34 47 79 81 59 77 39 37 79 73 47 10 16 90 33 75 74 96 12 25 61 23 58 40 54 88 43 94 90 8 45 38 78 5 65 89 98 49 51 88 46 84 19 47 60 95 7 26 87 54 85 27 64 81 31 87 49 10 29 70 The total is: 5656 Hint: 1. The working directory in your program is the project folder in NetBeans. 2. Use flush() method of PrintWriter to save the content after you write out the numbers.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Do the task what in the question says and please dont plagarise or copy from other sources thank you. Read the question carefully 

Task: Text IO
Perform the followings in a main() method. Use the try-with-resources syntax.
•
Output the following numbers to a file named "textIO.txt": 25 71 70 99 63 4
10 20 52 75 59 85 64 8 59 69 73 71 73 70 27 77 64 77 94 19 57 59 63 17 97
83 81 57 60 21 93 59 62 63 34 47 79 81 59 77 39 37 79 73 47 10 16 90 33
75 74 96 12 25 61 23 58 40 54 88 43 94 90 8 45 38 78 5 65 89 98 49 51 88
46 84 19 47 60 95 7 26 87 54 85 27 64 81 31 87 49 10 29 70. Your program
should check if the file exists. If not, your program will create the file. You can
output the numbers all together as a String (copy and paste the numbers into
your program).
Read the numbers back from the file, compute their total, and appends the
total to the end of the file in a new line. Note appending means the original
numbers should not be deleted or replaced. The file should have the following
content after your program is executed:
textIO.txt
25 71 70 99 63 4 10 20 52 75 59 85 64 8 59 69 73 71 73 70 27 77 64 77 94 19 57 59 63 17 97 83 81 57
60 21 93 59 62 63 34 47 79 81 59 77 39 37 79 73 47 10 16 90 33 75 74 96 12 25 61 23 58 40 54 88 43 94
90 8 45 38 78 5 65 89 98 49 51 88 46 84 19 47 60 95 7 26 87 54 85 27 64 81 31 87 49 10 29 70
The total is: 5656
Hint:
1. The working directory in your program is the project folder in NetBeans.
2. Use flush() method of PrintWriter to save the content after you write out the
numbers.
Transcribed Image Text:Task: Text IO Perform the followings in a main() method. Use the try-with-resources syntax. • Output the following numbers to a file named "textIO.txt": 25 71 70 99 63 4 10 20 52 75 59 85 64 8 59 69 73 71 73 70 27 77 64 77 94 19 57 59 63 17 97 83 81 57 60 21 93 59 62 63 34 47 79 81 59 77 39 37 79 73 47 10 16 90 33 75 74 96 12 25 61 23 58 40 54 88 43 94 90 8 45 38 78 5 65 89 98 49 51 88 46 84 19 47 60 95 7 26 87 54 85 27 64 81 31 87 49 10 29 70. Your program should check if the file exists. If not, your program will create the file. You can output the numbers all together as a String (copy and paste the numbers into your program). Read the numbers back from the file, compute their total, and appends the total to the end of the file in a new line. Note appending means the original numbers should not be deleted or replaced. The file should have the following content after your program is executed: textIO.txt 25 71 70 99 63 4 10 20 52 75 59 85 64 8 59 69 73 71 73 70 27 77 64 77 94 19 57 59 63 17 97 83 81 57 60 21 93 59 62 63 34 47 79 81 59 77 39 37 79 73 47 10 16 90 33 75 74 96 12 25 61 23 58 40 54 88 43 94 90 8 45 38 78 5 65 89 98 49 51 88 46 84 19 47 60 95 7 26 87 54 85 27 64 81 31 87 49 10 29 70 The total is: 5656 Hint: 1. The working directory in your program is the project folder in NetBeans. 2. Use flush() method of PrintWriter to save the content after you write out the numbers.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education