Saving fish by writing code! Applications developer in fisheries, specializing in webapps and moving 'enterprise-y' legacy systems to modern agile systems - Email or tweet me if you want to talk!
You have to go to war with the collection you have; or at least, the collections you are given.
Besides, in some contexts, a null at some collection position has a meaning that it lacks in other contexts.
Let's see if I can come up with a concrete example...
In the context of a revolver, I can imagine a collection where nulls are important - you want to know chamber 5 is empty. But in the context of knowing something about the collection bullets in the revolver, we can ignore the nulls.
There are also Swing UI things - JList, JComboBox, etc. where nulls in collections are useful, but I expect the Swing developer is a marginal case these days.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You have to go to war with the collection you have; or at least, the collections you are given.
Besides, in some contexts, a null at some collection position has a meaning that it lacks in other contexts.
Let's see if I can come up with a concrete example...
In the context of a revolver, I can imagine a collection where nulls are important - you want to know chamber 5 is empty. But in the context of knowing something about the collection bullets in the revolver, we can ignore the nulls.
There are also Swing UI things - JList, JComboBox, etc. where nulls in collections are useful, but I expect the Swing developer is a marginal case these days.