Practicing your craft is very important part of being a developer. Let`s try a simple exercise using Strings. For this exercise write a program that takes input from a user, the input should be a string, and then write a method that is using a String as a parameter and that returns a new string as a return value. The new string should contain the same letters as the parameter, but in reverse order.

Try it out. If you are stuck, scroll down for a solution.

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|

 

You have a better solution, fell free to share it with everyone.

Happy coding!

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *