Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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;
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: pgzint install windows 10 
Java :: how to add element in java arraylit syntax in gfg 
Java :: Change or Replace ArrayList Elements using set() function 
Java :: spring environment null pointer exception 
Java :: @android:color/system_neutral1_1000 
Java :: java optional input for funktions 
Java :: popcat 
Java :: spigot change move speed of living entity creature 
Java :: java 8 validate based on pair of strings 
Java :: how to array list with a delimiter into text file java 
Java :: how to check android version 9 above programatically 
Java :: bukkit detect block that nowbal hit 
Java :: venatana emergente con texto java 
Java :: char array substring java 
Java :: java program for calendar using applet 
Java :: how to get map with string as key and Arraylist as value in java 
Java :: java accept user input 
Java :: javafx treeview directory 
Java :: choose image java 
Java :: java structure 
Java :: how to create a 2d arraylist java 
Java :: arraylist add method 
Java :: convert long to localdatetime java 
Java :: java program to print vowels in a string 
Java :: row and column sorted matrix 
Java :: start an activity in adapter 
Java :: java timer schedule every day 
Java :: android MediaStore update cache before query 
Sql :: codeigniter print last sql query 
Sql :: guid to string sql 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =