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.
Liked By
Write Answer
How can one prove that the array is not null but empty using one line of code?
Join MindStick Community
You have need login or register for voting of answers or question.
Sumit Kesarwani
23-Aug-2014Print 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.