how to create a java program that ask the user to input a string and to input a number of how many times you want to reverse it at right to left?
please help me with creating this program..
sample:
Enter word:
computer
enter number of rotation:
3
output:
tercompu
ruzt
0
Newbie Poster
Recommended Answers
Jump to PostOkay. If you are able to get the user to enter a string, reversing it is easy. Just say StringBuffer(input).reverse().toString(), where "input" is the string which the user has entered, and you now have the reversed version of the string which you can then feed back to the user.
Jump to PostReverse or Rotate? The requirement and title are contradictory.
Jump to PostThere are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in doing your homework for you.
DaniWeb Member Rules include:
"Do provide evidence of having done some work yourself if posting …
Jump to Postnevermind
All 13 Replies
JGorard159
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
ruzt
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
nitinmbhanu
-3
Newbie Poster
ruzt
0
Newbie Poster
ruzt
0
Newbie Poster
ruzt
0
Newbie Poster
nitinmbhanu
commented:
it is reversion!!!!!!!!!!!!!!!!
+0
ruzt
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
nitinmbhanu
-3
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
nitinmbhanu
-3
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.