package org.psjava.ds.stack;


public class GoodStackFactory {

	public static StackFactory getInstance() {
		return new StackFactoryUsingDynamicArray();
	}

}

@@ -25,18 +25,16 @@
 ack;%0D%0A%0D%0A
-%0D%0A
 public c
@@ -60,16 +60,119 @@
 ry %7B%0D%0A%0D%0A
+%09private static final StackFactoryUsingDynamicArray INSTANCE = new StackFactoryUsingDynamicArray();%0D%0A%0D%0A
 %09public 
@@ -221,43 +221,16 @@
 urn 
-new StackFactoryUsingDynamicArray()
+INSTANCE
 ;%0D%0A%09

add static field for memory usaage