public class GarbageCollectionDemo {
    public static void main(String[] args) {
        // 객체 생성
        String a = new String("Dog");
        String b = new String("Cat");
        String c = new String("Bird");

        a = null;
        c = b;
    }
}