In this example we are demonstrating the command line argument and displaying it in its backward direction on the console.
Description of program:
In the example given below, we are taking a command
line argument and storing it in a string type array passed into the main method.
Then we are taking a loop backward through the array of arguments and one more
loop backwards through the characters in each argument and then printing out character j of argument
i, adding the space at the end of each argument and at the end terminating the line when we're done.
Here is the output:
|C:\Examples>java Reverse roseindia
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: December 18, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles