8大基本包装类

byte    Byte

short    Short

int     Integer

long    Long

float    Float

double   Double

char    Character

boolean  Boolean

 1 package org.example.commom;
 2 
 3 public class TestInteger {
 4 
 5     public static void main(String[] args) {
 6         Integer i = new Integer(1000);
 7         System.out.println(i);
 8         System.out.println(Integer.MAX_VALUE);
 9         System.out.println(Integer.toHexString(i));
10         i = Integer.parseInt("123");
11         System.out.println(i);
12         i = new Integer("222");        //字符串构造器
13         System.out.println(i);
14     }
15 
16 }

猜你喜欢

转载自www.cnblogs.com/ss-123/p/8974194.html
今日推荐