Example for isLetter() method in Java

Example for isLetter() method in Java


Posted in : Core Java Posted on : October 1, 2010 at 2:40 PM Comments : [ 0 ]

In this example, We will inform you about the isDigit() method of the character class.

Example for isLetter() method in Java

In this example, We will inform you about the isDigit() method of the character class. This method specifies that the given character is a letter or not. This method returns the Boolean value true if the character is letter otherwise it returns false. Here is the example as .

Example:CharacterisLetter.java

package com.devmanuals;

public class CharacterIsLetter {

	public static void main(String[] args) {

		System.out.print("Is character A is letter= ");
		System.out.println(Character.isLetter('A'));
		System.out.print("Is character 9 is letter= ");
		System.out.println(Character.isLetter('9'));
		System.out.print("Is character @ is letter= ");
		System.out.println(Character.isLetter('@'));
	}

}

Output:

Is character A is letter= true

Is character 9 is letter= false

Is character @ is letter= false

Download The Example.

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics