A java blog with a collection of examples and tutorials on Java and related technologies. (Under maintenance with continuous updates)
Be in touch with java jazzle or k2java.blogspot.com.
Pages
▼
Tuesday, May 17, 2011
Arrays of length 0
It is legal to have arrays of length 0. Such an array can be useful if you write a method that computes an array result and the result happens to be empty. You construct an array of length 0 as
new zeroArr[0];
Note that an array of length 0 is not the same as null.
No comments:
Post a Comment