Possible Duplicate:
What is the usage of array of zero length?
What is the purpose of zero length arrays.Are they of any use or just like that because the syntax allows?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have a function that takes an array, and you want to give it an array with nothing in it, you pass an zero-length array.
If you read an array from an external source, and it happens to not have any items, you’ll get an zero-length array.