/* Wrapper classes in Java... see java.lang in API: Boolean: Boolean(boolean b), new Boolean(String s), booleanValue() Integer: Char(char c), charValue() Double: Double(double d), Double(String s), doubleValue() see also Number, BigDecimal, BigInteger, Byte, Long, Float, Short */ public class Wrappers { public static void main(String[] args) { Integer o1 = new Integer(4); Integer o2 = new Integer(4); if (o1.equals(o2)) System.out.println("hooray for wrappers!"); int i1 = o1.intValue(); int i2 = o2.intValue(); if (i1==i2) System.out.println("hooray for base types!"); } } /* output: hooray for wrappers! hooray for base types! */