R
Rene
I have an array that may or may not contain data during the course of its
life. When I first instantiate my class level array reference I set the
array to null:
int[] xyz = null;
But I am thinking of initializing it to zero
int[] xyz = new int[0]
There is no good reason why I need to do this except that it feels more
accurate to say that an array contains zero items rather than null.
Can anyone share some opinions on why I should go one way versus another?
Performance issues, good practices, etc?
Thank you.
life. When I first instantiate my class level array reference I set the
array to null:
int[] xyz = null;
But I am thinking of initializing it to zero
int[] xyz = new int[0]
There is no good reason why I need to do this except that it feels more
accurate to say that an array contains zero items rather than null.
Can anyone share some opinions on why I should go one way versus another?
Performance issues, good practices, etc?
Thank you.