Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to check whether a character is vowel in java

public class CodeGrepper {
    public static boolean isVowel(char letter) {
        String vowels = "aeouiAEOUI";
        return vowels.indexOf(letter) != -1; 
    }
    public static void main(String[] args) {
        System.out.println(isVowel('a')); // true
        System.out.println(isVowel('z')); // false
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: how to find the largest number in a 2d array java 
Java :: java logger error 
Java :: read json file java 
Java :: How to perform breadth first search through a binary tree, in Java? 
Java :: read integer input java 
Java :: java add com.google.guava dependancy maven 
Java :: java xmx example 
Java :: String by byte array in java 
Java :: how to add elements in array in java using for loop 
Java :: set intersection java 
Java :: imageio class java 
Java :: binding fragment android 
Java :: key listener java 
Java :: java 8 list stream delete by name 
Java :: java arraylist to array 
Java :: clear text field in java 
Java :: kotlin variable in string 
Java :: how to declare an array in java 
Java :: android checkbox tint color 
Java :: java bigdecimal check less zero 
Java :: calculator with java 
Java :: if number is negative java 
Java :: kjk;ok 
Java :: odd number in java 
Java :: java list distinct by key 
Java :: print float number with only four places after the decimal point in java 
Java :: how to check if string is double or not in java 
Java :: android xml hide 
Java :: what does static mean java 
Java :: java eclipse console clear 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =