String类定义实现了java.io.Serializable, Comparable<String>, CharSequence 三个接口:并且为final修饰. public final class String defined String由char[]数组实现 /** The value is used for character storage. */ private final char value[]; /** Cache the hash code for the strin…
package com.ljy.chapter5; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Scanner; /** * This program uses reflection to print all features of…
Byte 类字节,属于Number. public final class Byte extends Number implements Comparable<Byte> { /** * A constant holding the minimum value a {@code byte} can * have, -2<sup>7</sup>. */ public static final byte MIN_VALUE = -128; /** * A constant…
总体阅读了Long的源码,基本跟Integer类类似,所以特别全部贴出源码,直接注释进行理解. // final修饰符 public final class Long extends Number implements Comparable<Long> { /** * A constant holding the minimum value a {@code long} can * have, -2<sup>63</sup>. */ // 最小值-负值 @Native…
Integer定义,final不可修改的类 public final class Integer extends Number implements Comparable<Integer> 常量定义 /** * A constant holding the minimum value an {@code int} can * have, -2<sup>31</sup>. */ @Native public static final int MIN_VALUE = 0x8…
异常信息 java.lang.StackOverflowError: null at sun.misc.FloatingDecimal$BinaryToASCIIBuffer.dtoa(FloatingDecimal.java:431) ~[na:1.8.0_77] at sun.misc.FloatingDecimal$BinaryToASCIIBuffer.access$100(FloatingDecimal.java:259) ~[na:1.8.0_77] at sun.misc.Floa…