Os:windows7 x64
Jdk:jdk-8u131-windows-x64
Ide:eclipse Oxygen Release (4.7.0)
Code
Package Jizuiku3;public class Demo111 {public static void main (string[] args) {//int is the base type//integer is the wrapper type//auto-boxing is Basic automatic packaging//automatic unpacking is the wrapper automatically change the basic integer i = new integer (123);//General integer SI = 123;//auto-Boxed si = si + 234;//auto-unpacking}}
Xjad (in order to better understand the packing and unpacking, I put the anti-compiled code is also pasted here, these two are corresponding):
Package Jizuiku3;public class Demo111{public Demo111 () {}public static void Main (String args[]) {Integer i = new Integer (123 ); Integer si = integer.valueof (123); si = Integer.valueof (si.intvalue () + 234);}}
Java is good, worth learning.
Learning resources: CZBK's video library. If you have public resources, can share to me, with your resources to learn also can.
Blog post is to watch the video, into thinking written. It's good that the teacher speaks well. Blog bad, is to give the most bitter not serious.
JavaSE8 base Integer and int auto-conversion automatic boxing and unpacking