Java学习笔记-第三章-基础语法

版权声明:Leo.All Rights Reserved. https://blog.csdn.net/qq_41113081/article/details/89225552

基本数据类型

  1. 整数
    • short 2字节
    • int 4字节
    • long 8 字节
  2. 字节 1字节
  3. 浮点数
    • float 4字节
    • double 8字节
  4. 字符与布尔

编码

  • Java采用Unicode 8.0编码
  • JVM采用UTF-16 BigEndian

编写整数或者浮点数可以加下划线

double PI = 3.14_15_926

switch

  • 可用于比较整数、字符串、字符和Enum

猜你喜欢

转载自blog.csdn.net/qq_41113081/article/details/89225552