1) The primitive types and their corresponding Wrapper classes’ hierarchy:

Chapter 8 Primitives as Types_第1张图片

 

2) Given that the wrapper classes are immutable, two objects with the same value can be used interchangeably, and there is no need to actually create two distinct objects. This fact is exploited by requiring that boxing conversions for certain value ranges of certain types always yield the same object. Those types and value ranges are:

Chapter 8 Primitives as Types_第2张图片

Example:

public class WrapperTest {
	static boolean test(Integer a, Integer b){ return a == b; }

	public static void main(String[] args) {
		System.out.println(test(3,3)); // in range [-128, 127], so identical object reference
		System.out.println(test(3, new Integer(3))); // boxing coversion and creating new object reference
		System.out.println(test(128, 128)); // out of range[-128, 127], so they are different object reference
	}
}

Output:

true
false
false