Autoboxing converts primitives to wrappers (e.g., `int`→`Integer`) and unboxing does the reverse. Pitfalls: unboxing `null` causes NPE, `Integer` caching can confuse `==`, and extra allocations can hurt performance in hot code.
Integer x = null;
// int y = x; // NullPointerException due to unboxing
Integer a = 100;
Integer b = 100;
System.out.println(a == b); // true (Integer cache)
Integer c = 1000;
Integer d = 1000;
System.out.println(c == d); // false