Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

autoboxing

Java wrapping a primitive in its wrapper object automatically, as when list.add(42) stores an Integer.

An implicit Integer.valueOf (or matching valueOf) call where a reference is required; values from -128 to 127 share cached objects.

Examples

  • List<Integer> xs = new ArrayList<>(); xs.add(5); boxes the int 5 into an Integer.

Read the full section →