d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > What Do You Think Is Worse > Static Object Or Private References Toit
Add Reply New Topic New Poll
Member
Posts: 7,998
Joined: Apr 11 2006
Gold: 3,572.46
Dec 5 2012 08:33pm
I have an arraylist ....... not that it makes much of a difference ... but I can either have a private reference in each object to the single list, or use a static variable ..............


thoughts?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Dec 5 2012 09:01pm
is that a private static variable inside the same class or a static variable outside the class? how many is "each object"? it depends on context and your design. i have the feeling you can change the design, but you're not giving enough info to go on.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll