1.

How Can One Prove That The Array Is Not Null But Empty?

Answer»

Print array.length. It will print 0. That MEANS it is empty. But if it would have been NULL then it would have THROWN a NullPointerException on ATTEMPTING to print array.length.

Print array.length. It will print 0. That means it is empty. But if it would have been null then it would have thrown a NullPointerException on attempting to print array.length.



Discussion

No Comment Found