0
/ 20
This methods takes a String object as a parameter and returns an encrypted version of the object. The encryption is done in two steps:...
This methods takes a String object as a parameter and returns an encrypted version of the object. The encryption is done in two steps: First, the first letter of the original string is moved to the end. Then, “ay” is appended at the end of the String. For example, if the String is “How”, the method should return “owHay”. If the length of the string is less than 1, it should not be changed.
Examples:
encrypt("How") -> "owHay"
Your feedback will appear here when you check your answer.