标题: [java interview]How can one prove that the array is notnull but empty using one line of code? [打印本页] 作者: 王萍 时间: 2013-8-16 13:15 标题: [java interview]How can one prove that the array is notnull but empty using one line of code? 作者: 李天一 时间: 2013-8-16 14:30
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.