Question: everyNthExcept(String string, int start, int skip, int except) returns a String Returns every skipth character of string, starting with the start-th character, except do not

everyNthExcept(String string, int start, int skip, int except) returns a String Returns every skipth character of string, starting with the start-th character, except do not include the character if it is one of the except-th characters from start. For example: everyNthExcept(s, 2, 2, 4)should include every 2nd character of s, starting with the second character of s, but it does not include every 4th character after the second character of s. You can assume start, skip, and except are all positive. everyNthExcept("abcdefghijklmnop", 2, 2, 4) should return "bdhlp" everyNthExcept("abcdefghijklmnop", 3, 2, 4) should return "ceim"

You are allowed to use the following from the Java API:

class String

length

charAt

class StringBuilder

length

charAt

append

toString

class Character

any method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!