Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<Object> list;
- //Here the list is NULL
- list = new ArrayList();
- //Here the list is no longer NULL, but list.isEmpty() will return true, because there are no variables added to the list
- list.add(new Object());
- //Here the list is not NULL, and list.isEmpty() will return false, because there is a 'new Object()' added
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement