STEP 2: Text File I/O (20 points)
Write a program called TextFileIO.java to create a file named numbers.dat. Then create an algorithm that writes all even numbered integers from 1 to 100, separated by a comma. After the file has been created, close and reopen the file and display the results to the screen. After the results have been displayed append the odd number integers from 1 to 100, separated by a comma to the end of the file. Reopen the file and display the results. The contents of the file should be the even numbers from 1 to 100 separated by a comma followed by the odd number from 1 to 100 separated by a comma. The output of this program would be something like the following
Solution contains java source file (*.java), class file (*.class) and screenshot
You can using any java IDE, create new project and add all java source code to src folder and run programs.
If you have more question, please contact me via email email@example.com
I will help you any time