1. Read a file name from the console. Read the contents of the file.
2. For each line in the file:
2.1. reverse the order of all characters.
2.2. display the result.
3. Close the streams.
Example input file:
I'm a programmer.
Amigo
Example result:
.remmargorp a m'I
ogimA
Mirror image
- 12
Locked
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Skynet
28 February 2020, 10:19
Thank you, StringBuilder class, for your reverse() method.
+3
Petros
30 August 2020, 02:36
Wow, I created a method to do this AND used StringBuilder in the method LOL. This is much better. Thanks!
+1
Andrei
22 February 2021, 12:32
I used a reverse for loop but good to know!
0