Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!198.186.194.247.MISMATCH!news-out.readnews.com!transit3.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Size of an arraylist in bytes Date: Fri, 25 Nov 2011 20:15:18 -0800 (PST) Organization: http://groups.google.com Lines: 28 Message-ID: <7367747.262.1322280918963.JavaMail.geo-discussion-forums@prfi36> References: <9477543.159.1321850670195.JavaMail.geo-discussion-forums@prmf13> <4ed05a28$0$283$14726298@news.sunsite.dk> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 173.164.137.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1322280919 26173 127.0.0.1 (26 Nov 2011 04:15:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 26 Nov 2011 04:15:19 +0000 (UTC) In-Reply-To: <4ed05a28$0$283$14726298@news.sunsite.dk> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10262 Arne Vajh=F8j wrote: > What is the difference between pointers for someone from a C background > and C style pointers? "Pointers" are things defined generally for computer science and don't real= ly depend on one's background any more than does the definition of "photon"= . "C-style pointer" is a colloquial way to express the connotative package= of assumptions about the attributes and behaviors of pointers made by thos= e with a background in "C", or really any non-Java language. One of Java's= innovations (or errors, depending on your outlook) was the removal of most= of the attributes and behaviors those with a C background tend to associat= e with pointers. Only the core notion that they point to the location of a= n object remained, pretty much. No more arithmetic, no more wild pointing = into spaces beyond allocated memory, no more aliasing pointers to different= types. The notion of pointer was bound much more tightly to the underlyin= g type in Java than in C. In keeping, somewhat, with C/C++ usage and more = general computer programming terminology, Java primarily uses the term "ref= erence", which I suppose carries more connotations of fixed target and tigh= tly-bound type. Still, they took pains to note in the JLS that references = are pointers. So, summary: "pointers" are what they are regardless of one's background, "= C-style pointers" are pointers implemented with the attributes and behavior= s that pointers possess in C. --=20 Lew