[java interview]How can one prove that the array is notnull but empty using one line of code?
Printargs.length. It will print 0. That means it is empty. But if it would havebeen null then it would have thrown a NullPointerException on attempting toprint args.length.
页:
[1]