/**
* 测试字符类型和布尔类型
* @author aflft
*
*/
public class TestPrimitveDateType3 {
public static void main(String[] args) {
char a = 'T';
char b = '尚';
char c = '\u0061';
System.out.println(c);
//转义字符
System.out.println(""+'a'+'\n'+'b');
System.out.println(""+'a'+'\t'+'b');
//String就是字符序列
String d="abc";
System.out.println(d);
//测试布尔类型
boolean man=true;
if(man==true) {//==true可写可不写不推荐写
System.out.println("男性");
}
}
}
« 算术运算符
|
浮点数据类型测试»
|