markdown
### Object
```text
Class Object is the root of the class hierarchy. Every class has Object as a
superclass. All objects, including arrays, implement the methods of this class.
```
*
*From Java Docs*
* ### 包装类 ```text 针对八种基本数据类型定义相应的引用类型 * byte Byte * short Short * int Integer * long Long * float Float * double Double 以上有一个共同的父类 Number * boolean Boolean * char Character ``` #### 包装类/基本数据类型/String 转换 基本类型 -> 包装类 ```text Integer integer = Integer.valueOf(80); ``` 包装类 -> 基本类型 ```text int temp = integer.intValue(); ``` 包装类 -> String ```text integer.toString(); ``` String -> 包装类 ```text Integer.parseInt("123"); ``` 基本数据类型 -> String ```text String.valueOf(123); ``` #### 自动装箱与自动拆箱 ```text 自动装箱: 基本类型 -> 包装类 自动拆箱: 包装类 -> 基本类型 ``` **可以相互赋值,自动转换*
* #### IntegerCache *private static class Integer.IntegerCache* ```text 使用Integer 包装类时,自动创建数值 -128 到 127 的数组 ``` **[返回教程主页](https://www.monody.net/p/blog-page_3.html)*
*
评论