Tagged Questions
8
votes
6answers
1k views
Why did Java make package access default?
I'm asking this question because I believe they did it for a very good reason and that most people do not use it properly, well from my experience in industry so far anyway.
But if my theory is true ...
8
votes
5answers
518 views
How to TDD test that objects are being added to a collection if the collection is private?
Assume that I planned to write a class that worked something like this:
public class GameCharacter {
private Collection<CharacterEffect> _collection;
public void Add(CharacterEffect e) ...