L
Luc The Perverse
Chris Uppal said:Null objects are useful. The person at Sun writing this class apparently
forgot that.
Huh? You can't set abstract objects to null?
I had not looked into this but that doesn't make any sense at all.
I thought the beauty of OOP (transcending language) was being able to write
code like this.
AbstractAnimalClass[] pets = {null, new Dog(), new Cat()};
for(int i=0;i<pets.length;i++)
if(pets!=null)
pets.speak(); //Make some noise!