If I have a class, CatFrame, that extends JFrame then I set myCat = new CatFrame(); then later I do myCat = new CatFrame(false);. Is the old CatFrame eligible for garbage collection?
public class CatFrame extends JFrame{
public CatFrame(){
this.setVisible(false);
}
public CatFrame(boolean b){
this.setVisible(false);
}
}