java - How expensive is a static ArrayList? -
let's have abstract class menu
, 3 subclasses mexicanmenu
, finnishmenu
, japanesemenu
.
is more expensive having each kind of menu static arraylist<string> menu
or non-static one?
what pro , cons of using static menu against using "instance" method? oo design speaking think both equally compliant purpose.
is more expensive having each kind of menu static
that basic need of method overriding. , i'm not sure why going static
there no side effect/ expensive memory leaks, far not concern thread safety.
i'm suggesting bind them instances
.
Comments
Post a Comment