public class Test{ public static void main(String []args){ boolean b = true; if(b){//b为true b = false; System.out.println("b is true"); } if(!b){//!b为true System.out.println("b is false now"); } }}