1. 객체 생성과 재사용

String s1 = new String("this is String");
String s2 = "this is String";

2. 정적 팩토리 메서드를 이용한 객체 재사용

String str = "TRUE";
Boolean b1 = new Boolean(str);      // 생성자(constructor)를 사용한 객체 인스턴스 생성
Boolean b2 = Boolean.valueOf(str);  // 정적 팩토리 메서드를 사용한 객체 인스턴스 재사용   

    /**
     * The {@code Boolean} object corresponding to the primitive
     * value {@code true}.
     */
    public static final Boolean TRUE = new Boolean(true);

    /**
     * The {@code Boolean} object corresponding to the primitive
     * value {@code false}.
     */
    public static final Boolean FALSE = new Boolean(false);
    
    public static boolean parseBoolean(String s) {
        return "true".equalsIgnoreCase(s);
    }
    
    public static Boolean valueOf(String s) { // valueOf
        return parseBoolean(s) ? TRUE : FALSE;
    }