Question: [10 marks] Write a Java program to track how many times the program has been executed. You can store an int representing the count in
![[10 marks] Write a Java program to track how many times](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f391e56af5c_62866f391e4e2289.jpg)
[10 marks] Write a Java program to track how many times the program has been executed. You can store an int representing the count in a file, e.g., count.dat. Each time your program is executed, read the count, increment it by 1, and then store it back to the file. If count.dat doesn't exist (e.g., first time to run the program), store 1 in the file. Use binary O for your code. For this question, just write your code in the mainmethod and declare the checked exceptions in the method's header
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
