「java入門」Character.isWhitespace()の使い方
Javaコード
public class IsWhitespacdemo {
public static void main(String[] args) {
System.out.println(“11:"+Character.isWhitespace('\n’));
System.out.println(“22:"+Character.isWhitespace('\t’));
System.out.println(“33:"+Character.isWhitespace('c’));
System.out.println(“33:"+Character.isWhitespace(' '));
}
}
結果
11:true
22:true
33:false
33:true