hc学习平台

 找回密码
 立即注册
搜索
热搜: 活动 交友 javakc
 › 17732177163 › 日志

列举Java中的逻辑运算符  

2022-08-05 16:51:04 查看(2) 回复(0)

public class luojiyunsuan {
    public static void main(String[] args) {
        boolean a=true;
        boolean c=true;
        boolean b=false;
        boolean d=false;

        System.out.println(a||b);//true 或 false 为true
        System.out.println(a||c);//True 或 true  为true
        System.out.println(b||d);//false 或 false 为false
        System.out.println(!b&&a);//非false  且true==true且true 为对
        System.out.println(!a);//非true 为 false
    }
}

评论 (0 个评论)

facelist

全部作者的其他最新日志



站点统计|举报|Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, , Processed in 0.195171 second(s), 9 queries .

Powered by javakc! X1.0

© 2004-2014 javakc

f1208.com 备案号:京ICP备14030918号-1

返回顶部