How to determines if a character is defined in Unicode with Java

1 Answer

0 votes
package javaapplication1;
 
public class JavaApplication1 {
   
    public static void main(String[] args) {
          
        char ch = 'a';

        boolean b;

        b = Character.isDefined(ch);
        System.out.println(b);
        
        b = Character.isDefined('@');
        System.out.println(b);
    }
}
 
/*
run:

true
true
 
*/

 



answered Sep 13, 2016 by avibootz
...