I’m working on a java question and need an explanation and answer to help me learn.

I need to get this done, but I have another assignments to do. So someone help me with this.

It does not take long, because it is just an assignment to mimic the existing file.