How to determine if a character may be part of a Unicode identifier in Java

1 Answer

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

        boolean b;
        
        b = Character.isUnicodeIdentifierPart(ch);
        System.out.println(b);
        
        System.out.println(Character.isUnicodeIdentifierPart('a'));
    }
}
 
/*
run:

false
true
 
*/

 



answered Sep 16, 2016 by avibootz
...