Results 1 to 2 of 2

Thread: String Recursion -> print every other character in a string

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2011
    Posts
    1

    String Recursion -> print every other character in a string

    Im trying to write a purely recursive method (i.e. no for, while, or do-while loops) that prints every other character of a string (for example, calling printEveryOther("method frame") should produce the output: mto rm

    I'm starting with:

    public static void printEveryOther(String str)

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: String Recursion -> print every other character in a string

    Lets see an attempt on your part. This looks like homework, so we are willing to help you, but you need to show some effort first.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width