This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Since this is posted in the beginner forum i will go in bit of a detail (Code Examples etc.)
I don't think there is any way other than looping and checking each element for null.
The only other supposedly "Easy" way could have been by checking out the size but that wont work because if we add null to an arraylist it increments its size.
Code Example :- In the below mentioned code we add null twice to the arrayList aList and it prints out its size as '2'.
Here is a method for finding if the arraylist is null
Joined: Mar 23, 2009
Mr. Campbell Ritchie. Why was the code example deleted.Was it a little more than what the answer required.
Posted it as it was a beginners forum.