zoukankan      html  css  js  c++  java
  • java类型转换

    1、基本类型和string数据互转

    类型 包装类型 string int short long byte float double char boolean    
    int Integer

    int i=234;

    String s=String.ValueOf(234);

    s=Integer.ToSring(234);

    s=""+i;

                       
    short Short                      
    long Long                      
    byte Byte                      
    float Float                      
    double Double                      
    char Character                      
    boolean Boolean                      
    string  

    int i=Integer.parseInt("234");

    i=Integer.valueof("234").intValue();

                     

    2、基本类型和二进制编码之间的转换

  • 相关阅读:
    代码
    怎么创建scrollview
    tcp/Ip http
    游戏道具
    FPS interv
    调整音乐
    插入排序
    冒泡排序
    JSON详解
    设计模式系列(2) 工厂模式之简单工厂模式
  • 原文地址:https://www.cnblogs.com/crhdyl/p/5113635.html
Copyright © 2011-2022 走看看