Table of Contents
Character class’s isletter method can be used to check if character is letter or not.
Method signature
1 2 3 |
public static boolean isLetter(char ch): |
Parameters
ch is primitive character type.
Return type
boolean is primitive character type.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
package org.arpit.java2blog; public class JavaIsLetterMain { public static void main(String[] args) { System.out.println(Character.isLetter('a')); System.out.println(Character.isLetter('Y')); System.out.println(Character.isLetter('5')); System.out.println(Character.isLetter('&')); } } |
When you run above program, you will get below output:
true
true
false
false
true
false
false
That’s all about java Character’s isletter method.
Was this post helpful?
Let us know if this post was helpful. Feedbacks are monitored on daily basis. Please do provide feedback as that\'s the only way to improve.