tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 
 Java > Core > Character > Is Letter Or Digit

Is Letter Or Digit 

The following example shows how to use Character.isLetterOrDigit() API.

File Name  :  
com/bethecoder/tutorials/core/character/CharIsLetterOrDigit.java 
Author  :  Sudhakar KV
Email  :  kvenkatasudhakar@gmail.com
   
package com.bethecoder.tutorials.core.character;

public class CharIsLetterOrDigit {

  /**
   @param args
   */
  public static void main(String[] args) {
    System.out.println(Character.isLetterOrDigit('a'));
    System.out.println(Character.isLetterOrDigit('z'));
    System.out.println(Character.isLetterOrDigit('A'));
    System.out.println(Character.isLetterOrDigit('Z'));
    
    System.out.println(Character.isLetterOrDigit(' '));
    System.out.println(Character.isLetterOrDigit('\n'));
    System.out.println(Character.isLetterOrDigit('\t'));
    
    System.out.println(Character.isLetterOrDigit('0'));
    System.out.println(Character.isLetterOrDigit('6'));
  }

}
   

It gives the following output,
true
true
true
true

false
false
false

true
true


                    Print

   



Books Recommendation

 
 
bl  br