Here you can find the source of size(Collection c)
Parameter | Description |
---|---|
c | the collection to size |
public static int size(Collection c)
//package com.java2s; import java.util.Collection; public class Main { /**//from w w w .ja v a2 s . c o m * Returns 0 if the specified collection is null or the collection size * if not null. * * @param c the collection to size * @return the size of the collection */ public static int size(Collection c) { return (c == null) ? 0 : c.size(); } }