zoukankan      html  css  js  c++  java
  • Integer的toString()

    1、Integer的toString() 有静态和非静态方法,还有toHexString  以及 toBinaryString、toUnsignedString

    2、Integer还继承了Number类,包括方法:intValue、longValue、floatValue、doubleValue、byteValue、shortValue

    3、Integer.toString(int i); 就是将i转为string

    4、Integer.toString(int par1,int par2),par1表示要转成字符串的数字,par2表示要转成的进制表示,如:

    Integer.toString(100,2),表示把100转成2进制表示的字符串,

    Integer.toString(100,10),表示把100转成10进制表示的字符串,

    Integer.toString(100,16),表示把100转成16进制表示的字符串,

    Integer.toString(100,36),表示把100转成36进制表示的字符串,即100到36之间的数字表示为a到z的表示。  

    ===========================================

    实际应用:牛客网判断子串的一道题 https://ac.nowcoder.com/acm/problem/13253?&headNav=acm

    不忘初心,相信自己,坚持下去,付诸实施。
  • 相关阅读:
    列表
    Lambda表达式
    委托
    泛型(二)
    泛型(一)
    继承
    object类
    linux 命令补全包
    记一次 mysql 安装完成后启动报错 且 日志为空
    nginx 下配置https 访问提示下载文件 解决方法
  • 原文地址:https://www.cnblogs.com/controller666/p/14536147.html
Copyright © 2011-2022 走看看