From owner-freebsd-java@FreeBSD.ORG Tue May 11 03:59:25 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A58716A4CE for ; Tue, 11 May 2004 03:59:25 -0700 (PDT) Received: from home.berger.to (client80-83-46-98.abo.net2000.ch [80.83.46.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BEF943D5A for ; Tue, 11 May 2004 03:59:24 -0700 (PDT) (envelope-from cedric@berger.to) Received: from berger.to (desktop.berger.to [192.168.1.2]) by home.berger.to (8.12.11/8.12.11) with ESMTP id i4BAwvKE025848; Tue, 11 May 2004 12:58:57 +0200 (CEST) Message-ID: <40A0B1F0.3090206@berger.to> Date: Tue, 11 May 2004 12:58:56 +0200 From: Cedric Berger User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040316 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jan Grant References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Jayprakash_Gonella cc: freebsd-java@freebsd.org Subject: Re: Adding Object to a Vector X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2004 10:59:25 -0000 Jan Grant wrote: >On Tue, 11 May 2004, Achilleus Mantzios wrote: > > >>O kyrios Jayprakash_Gonella egrapse stis May 11, 2004 : >> >> >>>Hi, >>> May this is not the proper forum for my question. >>> >>>Can any body explain the internal representation (memory-wise) of a Vector >>>in Java? How does a Vector class implement a growable array of objects? >>> By looking at that function: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Vector.html#Vector(int,%20int) You can guess that the vector has a backing array of |initialCapacity, and when that array is too small, a new array ||capacityIncrement bigger is allocated. Cedric |