Java tutorial
//package com.java2s; import java.util.List; public class Main { @SuppressWarnings("rawtypes") public static final List chopList(List list) { if (null == list) { return null; } else { for (int i = 0; i < list.size(); i++) { if (null == list.get(i)) { list.remove(i); i--; } } return list; } } }