how to exclude null values from list in java 8 code example Example: java remove List null element dataList.removeAll(Collections.singleton(null));