JAvaプレゼンテーション論理演算の作成:およびまたは非異または

606 ワード

package day01;
/*
 *          ,                   
 */
public class TestLogic {
	public static void main(String[] args) {
		boolean b = true;
		boolean c = false;
		
		System.out.println(b&c); //   ,                  ,    ,     
		System.out.println(b|c); //   ,      ,       ,     ,    ,     
		System.out.println(!b); //  
		System.out.println(b^c); //  ,        ,    ,        ,    
		System.out.println(c&&b); //   ,   c  ,    ,        ,     b  ,    c    ,       b  
		System.out.println(c||b);//   ,   c  ,    ,          ,     b  ,  c  ,       b  。		
		
	}
}