Answers for "find the 3rd last consonant in the given input string java"

0

how to get the last vowel of a string in java

final String vowels = "aeiou";
for(int i = yourString.length() - 1; i > 0; i--)
{
    if(vowels.indexOf(yourString.toLowerCase().charAt(i)) >= 0)
    {
        System.out.println("The last vowel is : " + yourString.charAt(i));
        break;
    }
}
Posted by: Guest on March-09-2021

Code answers related to "find the 3rd last consonant in the given input string java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language