Java简单逻辑表达式

2019年2月12日21:22:01 发表评论 920 views
/**
 * Created by xabcd on 2019/2/12.
 */
public class TestJava6_12
{public static void main(String args[])
{
    boolean t = (1+1 == 2) && (1+2 ==3);
    System.out.println("(1+1 ==2 )&& (1+2 == 3):" +t);
    
}

}






结果:
(1+1 ==2 )&& (1+2 == 3):true

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: