- yes or no?
- Yes or No!
- No E Allowed
- Repetition
- PigLatin I
- Pig Latin II
- Pig Latin III
- Pig Latin Finale
Java String Resources:
PigLatin I
Collapse Content
Show Content
The NSA may have broken some encryption methods, so your boss has asked you to implement a new encryption standard - Pig Latin.
To get started, complete a method that moves the first letter of a given word to the end and adds an "ay" afterwards. For example, "laptop" should become "aptoplay".
Challenge
Given a String, return a String with "ay" added to the end.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Comments
Sakshi Pahwa
Aug 22, 1:10 PMInteresting exercise -
My logic was to first convert the string to char array, extract the first letter from the char array, shift the characters one place left, append the first character at
the end of the char array, convert it back to string and append "ay". I learnt a lot of things from this example.
Learneroo
Aug 22, 3:14 PMSee also the featured answer.
thales
Jul 17, 8:27 AMa solution:
my code
Gary
Mar 4, 4:18 PMHere is my solution. my code