• 9.18号


    public class Test

    {
    public static void main(String[] args)          //输出一个长整型的变量

      {
      long h = 123456789012345l;
      System.out.println(h);                      //输出一个单精度的小数常量 
      float h1 = 2.4f;
      System.out.println(h1);                   //输出布尔类型的变量
      boolean h2 = true;
      System.out.println(h2);
      h2 = false;
      System.out.println(h2);
      byte h3 = 3;
      h3 = (byte)(h3 + 200);
      System.out.println(h3);                                             //输出字符型的加法计算
      System.out.println((char)('a' + 1));
      System.out.println((char)('我' + 1));                       //演示变量的溢出效果
      int h4 = integer.MAX_VALUE + 1;
      System.out.println(h4);                                      //给x赋值,进行x=x/1000*1000的计算并输出结果


      }
    }

  • 相关阅读:
    Clam and fish
    费马小定理求逆元模板题
    1
    DP 习题
    106. 从中序与后序遍历序列构造二叉树
    计算几何(判断四边形形状)
    中国剩余定理
    BFS模板
    DFS模板
    线段树
  • 原文地址:https://www.cnblogs.com/ELF-CH/p/7640126.html
Copyright © 2020-2023  润新知