• java运算符之与或非


    package operator;
    
    public class Demo02 {
        public static void main(String[] args) {
            text0();
    
            text();
    
            text2();
    
            text3();
        }
    
    
        public  static  void  text3(){
             boolean a=true;
             boolean b=false;
    
            System.out.println("a && b:	"+(a&&b));//false
            System.out.println("a || b:	"+(a||b));//true
            System.out.println("!a && b:	"+!(a&&b));//true
    
        }
    
    
        public  static  void  text2(){
            int a=3;
            int b=a++;
            int c=++a;
    
            System.out.println(a);//5
            System.out.println(b);//3
            System.out.println(c);//5
    
    
            double pow = Math.pow(2, 3);
            System.out.println(pow);//8.0
        }
    
        public  static  void  text0(){
            long a = 123132131313131L;
            int b=12345;
            short c=10;
            byte d=88;
    
            System.out.println(a+b+c+d);//long 123132131325574
            System.out.println(b+c+d);//int 12443
            System.out.println(c+d);//int  98
        }
    
        public  static   void text(){
            int a=10;
            int b=20;
    
            int c = 21;
    
            System.out.println(c%a);//21/10 ===2.....1 ===>>1
            System.out.println(c/a);//21/10 ===2.....1 ===>> 2
    
            System.out.println(a>b);//false
            System.out.println(a<b);//true
            System.out.println(a==b);//false
            System.out.println(a!=b);//true
        }
    }
    
    
  • 相关阅读:
    7.25
    7.24
    7.23
    7.22
    输入语句/条件运算符
    flowLayoutPanel1设置内容随着鼠标滚动而滚动
    dataGridView读取xml文件
    读文本内容 写入文本内容 创建复制文本
    cmd.ExecuteScalar 和配置连接设置
    $.ajax async同步加载
  • 原文地址:https://www.cnblogs.com/d534/p/15070107.html
Copyright © 2020-2023  润新知