Tuesday 10 July 2012

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 a NullPointerException on attempting to print args.length.

No comments:

Post a Comment

What is Map Collection?

A map collection refers to a set of maps that are compiled and organized for a specific purpose, such as research, education, or preservatio...