-
March 20th, 2009, 11:55 AM
#1
recursive method reverse()
Write a recursive method void reverse() that reverses a sentence.
For example:
Sentence greeting=new Sentence("Hello!";
greeting.reverse9);
System.out.println(greeting.getText())...
prints the string "!olleH". Implement a recursive soloution by removing the first character, reversing a sentence consisting of the remaining text, and combining the two.
-
March 20th, 2009, 12:24 PM
#2
Re: recursive method reverse()
Just posting your homework without giving any indications of having attempted it yourself won't get you any help around here.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|