Nov 5, 2014

How can one prove that the array is not null but empty using one line of code?

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


Post a Comment