InterviewSolution
Saved Bookmarks
| 1. |
How Can One Prove That The Array Is Not Null But Empty Using One Line Of Code? |
|
Answer» 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 Null Pointer Exception on ATTEMPTING to print args.length. 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 Null Pointer Exception on attempting to print args.length. |
|