Pessoal,
Estava vendo essa famosa interface:
public interface Collection<E> extends Iterable<E> {
// Query Operations
/**
* Returns the number of elements in this collection. If this collection
* contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
* <tt>Integer.MAX_VALUE</tt>.
*
* @return the number of elements in this collection
*/
int size();
Nela existe um método chamado size() que retorna o número de elementos da coleção. Até ai td bem…mas onde esta o código que cálcula isso? sei q isso é muito simples, mas não entendi onde esta a implementação do código.
