标签:string mdm aac stat spi 表达 iot ima div
package com.lingyejun.blog; public class HexNum { public static void main(String[] args) { int a10 = 99; int a2 = 0b101; int a8 = 0143; int a16 = 0x63; System.out.println(a10); System.out.println(a2); System.out.println(a8); System.out.println(a16); int ma10 = -99; int ma2 = -0b101; int ma8 = -0143; int ma16 = -0x63; System.out.println(ma10); System.out.println(ma2); System.out.println(ma8); System.out.println(ma16); char c = ‘李‘; System.out.println("字母A在char中的编号" + Integer.toString(‘A‘) + " " + Integer.toBinaryString(‘A‘)); System.out.println("字母a在char中的编号" + Integer.toString(‘a‘)); System.out.println("char 字符 李 用二进制表示为 :" + Integer.toBinaryString(c)); System.out.println("char 字符 李 用八进制表示为 :" + Integer.toOctalString(c)); System.out.println("char 字符 李 用十六进制表示为 :" + Integer.toHexString(c)); } }
标签:string mdm aac stat spi 表达 iot ima div
原文地址:https://www.cnblogs.com/lingyejun/p/9743794.html