Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10113

Size of an arraylist in bytes

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.ripco.com!news.glorb.com!postnews.google.com!t36g2000prt.googlegroups.com!not-for-mail
From sara <sarasara82@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Size of an arraylist in bytes
Date Sun, 20 Nov 2011 13:01:44 -0800 (PST)
Organization http://groups.google.com
Lines 11
Message-ID <e9dcfb2d-dfef-4ae6-9d9f-979a8f08b962@t36g2000prt.googlegroups.com> (permalink)
NNTP-Posting-Host 128.125.163.149
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1321822905 10152 127.0.0.1 (20 Nov 2011 21:01:45 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Sun, 20 Nov 2011 21:01:45 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info t36g2000prt.googlegroups.com; posting-host=128.125.163.149; posting-account=puDXcgoAAAC_PxfF8n6Hw0IAo8V-SlSn
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-Header-Order HNKUARELSC
X-HTTP-UserAgent Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2,gzip(gfe)
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10113

Show key headers only | View raw


Hi All,

I create an Arraylist<Integer> tmp and add some integers to it.
Afterward, I measure the size of tmp in bytes (by converting tmp to
bytes array). Assume the result is byte[] C. However, when I update an
element of tmp, and measure size of tmp in bytes again, the result is
different than C!
Why this is the case?

Best
Sara

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Size of an arraylist in bytes sara <sarasara82@gmail.com> - 2011-11-20 13:01 -0800
  Re: Size of an arraylist in bytes markspace <-@.> - 2011-11-20 13:05 -0800
    Re: Size of an arraylist in bytes sara <sarasara82@gmail.com> - 2011-11-20 13:11 -0800
      Re: Size of an arraylist in bytes Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-20 21:58 +0000
      Re: Size of an arraylist in bytes markspace <-@.> - 2011-11-20 14:08 -0800
      Re: Size of an arraylist in bytes Patricia Shanahan <pats@acm.org> - 2011-11-20 14:50 -0800
      Re: Size of an arraylist in bytes Arne Vajhøj <arne@vajhoej.dk> - 2011-11-20 18:06 -0500
      Re: Size of an arraylist in bytes Lew <lewbloch@gmail.com> - 2011-11-20 20:28 -0800
  Re: Size of an arraylist in bytes Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-20 16:30 -0500
    Re: Size of an arraylist in bytes sara <sarasara82@gmail.com> - 2011-11-20 13:35 -0800
      Re: Size of an arraylist in bytes Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-20 17:19 -0500
    Re: Size of an arraylist in bytes Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-20 16:58 -0500
      Re: Size of an arraylist in bytes Patricia Shanahan <pats@acm.org> - 2011-11-20 14:04 -0800
        Re: Size of an arraylist in bytes Arne Vajhøj <arne@vajhoej.dk> - 2011-11-20 17:18 -0500
          Re: Size of an arraylist in bytes Patricia Shanahan <pats@acm.org> - 2011-11-20 14:48 -0800
            Re: Size of an arraylist in bytes Arne Vajhøj <arne@vajhoej.dk> - 2011-11-25 22:12 -0500
      Re: Size of an arraylist in bytes Lew <lewbloch@gmail.com> - 2011-11-20 20:44 -0800
        Re: Size of an arraylist in bytes Arne Vajhøj <arne@vajhoej.dk> - 2011-11-25 22:16 -0500
          Re: Size of an arraylist in bytes Lew <lewbloch@gmail.com> - 2011-11-25 20:15 -0800
  Re: Size of an arraylist in bytes Roedy Green <see_website@mindprod.com.invalid> - 2011-11-20 22:25 -0800
    Re: Size of an arraylist in bytes Arne Vajhøj <arne@vajhoej.dk> - 2011-11-25 22:11 -0500

csiph-web