In Java's Vector class, size() returns the number of elements currently stored, while capacity() returns the total allocated space. The size is always <= capacity. The question incorrectly conflates size with allocated space - size() tracks actual elements, not memory allocation.