Here you can find the source of countCollectionsSize(Collection... cols)
public static int countCollectionsSize(Collection... cols)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static int countCollectionsSize(Collection... cols) { int totalSize = 0; if (cols == null || cols.length < 1) return totalSize; for (Collection oneList : cols) { if (oneList == null) continue; totalSize += oneList.size(); }// w w w . j a v a 2 s . c o m return totalSize; } }