package 数据类型;
//布尔类型
class BoolTest {
public static void main(String args[]){
boolean b;
b = false;
System.out.println("b is " + b);
b = true;
System.out.println("b is " + b);//布尔型显示为true和false
if(b) System.out.println("this is not executed.");//布尔本身可以空if语句,不用写成if(b == true)
System.out.println("10 > 9 is " + (10>9));// > 符号返回类型为布尔型
}
}