Purchase Solution

Java - Reverse String

Not what you're looking for?

Ask Custom Question

Write a program that replaces each line of a file with its reverse. For example, if you run

java Reverse HelloPrinter.java

then the contents of HelloPrinter.java are changed to

retnirPolleH ssalc cilbup
{
)sgra ][gnirtS(niam diov citats cilbup
{
wodniw elosnoc eht ni gniteerg a yalpsiD //

;)"!dlroW ,olleH"(nltnirp.tuo.metsyS
}
}

Of course, if you run Reverse twice on the same file, you get back the original file.

Your main class should be called Reverse.

Run your program with these command-line arguments:

java Reverse input.txt

You need to supply the following class in your solution:

Reverser

Purchase this Solution

Solution Summary

The expert examines reverse string for Java.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic Networking Questions

This quiz consists of some basic networking questions.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.