Hi guys, back again...You guys were very helpful before and I ended up approaching it a totally different way. I used the mathematical way which is hard to explain but well...it worked so thanks.
Now I am having a problem constructing a program that prompts the user for a name and then displays it backwards. In this, I am excluding spaces so basically....john would be nhoj.
I know I am going to use toCharArray etc...But am i just going to use a for that decreases?
Did you not read jwenting's reply directly above yours? Look in the API for a single method call to reverse a String. I will give a small hint, the class is not String but does begin with it.
Hi guys, back again...You guys were very helpful before and I ended up approaching it a totally different way. I used the mathematical way which is hard to explain but well...it worked so thanks.
Now I am having a problem constructing a program that prompts the user for a name and then displays it backwards. In this, I am excluding spaces so basically....john would be nhoj.
I know I am going to use toCharArray etc...But am i just going to use a for that decreases?
:mrgreen: If you do a count, you can then print each letter starting from the very last number in your count until your count is 0.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in Java Forum Timeline:validations