happycompiler.com
Replace Consonants with the Previous Letters in Java
Write a program to input a sentence. Create a new sentence by replacing each consonant with the previous letter. If the previous letter is a vowel, then replace it with the next letter (i.e. if the…