zoukankan      html  css  js  c++  java
  • java学习笔记(二)之数据部分

    数据类型  

    java数据类型
    基本数据类型 数值型 整型byte/short/int/long  
    浮点型/double/float  
    字符型char    
    布尔型boolean 取值true  false  
         
    对象数据类型 类Class    
    接口 interface    
    数组array[]      
    类型  对象 位数 字节数 最小值 最大值

    byte    

    Byte       8        1        -128=2^7         127=2^7-1         

    short

    Short 16 2  -32768=2^15 32767=2^15-1

    int

    Integer 32 4 -2147483648=2^31 2147483647=2^31-1

    long   

    Long 64 8 -9223372036854775808=2^63               9223372036854775807=2^63-1

    float  

    Float 32 4 2^-149 (2-2^-23)^127

    double

    Double 64 8 2^-1074 (2-2^-52)^1023

    char  

    Character        

    字符型:

      字符编码  ASCII (American Standard Code Information Interchage)

          Unicode (统一码 java所采用的编码)

     数据也有对象

    int类型的对象 Integer

    方法主要有:toString() 转换为String类型;

          valueof()字符型转换为int型

    还有Float  Double  等对象。

    java中的常量

    前加上 final  而且定义后只能赋一次值

    --------------------
    做一个精神上的素食主义者。
  • 相关阅读:
    居中
    <script type="text/javascript"></script>
    移动端获取全文高度
    video
    transition animation
    移动端隐藏overflow:auto滚轮
    Vue将组件data内的数据重置
    文字刚刚刚刚刚好的居中
    小程序总结(不断更新)
    vue组件之间的传值
  • 原文地址:https://www.cnblogs.com/xfile/p/3739225.html
Copyright © 2011-2022 走看看