Question: . . Write a class named Reverse with the following: A private default constructor. A public static method named charreverse, which takes a String named
. . Write a class named Reverse with the following: A private default constructor. A public static method named charreverse, which takes a String named s and a char named ch as parameters and returns a string. The method should determine if ch can be found in s. If it can, place all characters that occur after ch before it (in order), and all characters that occur before ch should be placed after it (in order). Return this version of the String, If ch cannot be found in s, return the original value of s. . You can assume that if ch does occur in s, that it will not occur more than once. Do not use the stringBuilder or Arrays classes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
