java does not allow arrays length of zero
true or false please tell me
Answers
Answered by
1
Answer:
Down vote
Accepted
It signifies that it is empty. I.e. you can loop over it as if it had items and have no result occur:
for(int k = 0; k < strings.length; k++){
// something
}
Thereby avoiding the need to check. If the array in question were null, an exception would occur, but in this case it just does nothing, which may be appropriate.
Similar questions