find out the last vowel of a string in java

find out the last vowel of a string in java
refer to‮l:‬autturi.com
/**
 * @author lautturi.com
 * Java example: find last vowel in a string
 */

import java.util.*;
import java.util.Map.Entry;

public class Lautturi {

	public static void main(String[] args) {

		String testStr = "Hello Java world";
		final String vowels = "aeiou";
		for(int i = testStr.length() - 1; i > 0; i--)
		{
		    if(vowels.indexOf(testStr.toLowerCase().charAt(i)) >= 0)
		    {
		        System.out.println("The last vowel is : " + testStr.charAt(i));
		        break;
		    }
		}

	}
}
Created Time:2017-09-12 00:08:02  Author:lautturi