Question: this is for my Java class, so the answer needs to be written in Java. I have already created the input.txt file, so I just

this is for my Java class, so the answer needs to be written in Java.

I have already created the input.txt file, so I just need the java code.

Instructions:

Create text file (named input.txt) which has your full name on first line and your City of Birth in Second line. Write a program that reads the input.txt file and generates an output.txt file that has the following format:

  • Your name should be written on second line, backwards
  • Your City of Birth should be written on the first line

You will use something like this to take the input and produce the output:

File inputFile = new File(inputFileName); Scanner in = new Scanner(inputFile); PrintWriter out = new PrintWriter(outputFileName);

You will use a while loop to read the characters, so you will need to use charAt.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!