Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
53 events
when toggle format what by license comment
Nov 4, 2020 at 8:21 answer added Oguzhan Cevik timeline score: 2
Nov 13, 2019 at 19:37 history edited Jonas
edited tags
Jun 19, 2019 at 11:34 history protected Raedwald
S Jan 20, 2019 at 0:01 history suggested eeze CC BY-SA 4.0
Thats not how stackoverflow works
Jan 19, 2019 at 23:12 review Suggested edits
S Jan 20, 2019 at 0:01
S Nov 12, 2018 at 21:13 history rollback euphoria83
Rollback to Revision 3 - Edit approval overridden by post owner or moderator
Nov 11, 2018 at 7:52 history suggested eeze CC BY-SA 4.0
answer is already accepted
Nov 11, 2018 at 2:21 review Suggested edits
S Nov 12, 2018 at 21:13
Aug 23, 2018 at 18:30 review Suggested edits
Aug 23, 2018 at 20:19
Jul 3, 2018 at 13:29 answer added Xult timeline score: 6
Feb 2, 2017 at 15:05 comment added Pavlus They are surely not stored in continuous chunk of memory. Java object variables are pointers to the actual objects (unless they are local and put on the stack by JVM), so the array of String is, actually, an array of pointers to String objects which can be placed anywhere in the heap.
Nov 3, 2016 at 18:51 answer added boraseoksoon timeline score: 6
Jun 9, 2016 at 20:29 comment added user207421 @mattb That's what 'array' means throughout CS. No citation necessary. The numerous references in the JLS and [JVM Spec]() to array lengths are only comprehensible if arrays are contiguous.
Jun 9, 2016 at 20:12 answer added Tom Taylor timeline score: 0
Jun 1, 2016 at 20:00 answer added Xtra Coder timeline score: 2
May 13, 2016 at 0:38 comment added Vectorjohn The question (in the comments about memory) can't be answered because List is an interface not an implementation. ArrayList will always keep the data in a contiguous block of memory (it stores an array, hence the name). Other implementations will do other things.
Feb 22, 2016 at 6:24 answer added Vipin Jain timeline score: 1
Feb 18, 2015 at 0:32 history edited Roman Nikitchenko CC BY-SA 3.0
edited tags; edited title
Oct 30, 2014 at 16:14 answer added Alex Hayward timeline score: 2
Feb 19, 2014 at 6:37 answer added Nik timeline score: 2
Dec 4, 2013 at 22:54 answer added Shehan Simen timeline score: 4
Oct 24, 2013 at 9:13 comment added Mikkel Løkke Is this a case of premature optimization? The correct answer is "It depends". It depends on what JVM you are running, it depends on how your JIT compiler is optimizing the code, it depends on which platform you're running on. Arrays may be faster in JET or Avian , but lists might be faster on HotSpot or IcedTea. In short, if this is the degree of control you need over performance, you need to use a much lower level language like assembly or C. Java is not suitable.
May 24, 2013 at 8:35 answer added Roman Nikitchenko timeline score: 5
May 15, 2013 at 12:45 answer added assylias timeline score: 139
Oct 19, 2012 at 11:10 answer added Thomas Mauch timeline score: 4
Sep 16, 2012 at 1:50 answer added AbePralle timeline score: 14
Jul 25, 2012 at 21:53 answer added Vikram timeline score: 1
Sep 11, 2010 at 14:57 answer added JRalph timeline score: 2
S May 19, 2009 at 6:48 vote accept euphoria83
Apr 5, 2009 at 17:15 history edited euphoria83 CC BY-SA 2.5
added 142 characters in body
Apr 5, 2009 at 0:55 answer added tpdi timeline score: 6
Apr 5, 2009 at 0:00 vote accept euphoria83
S May 19, 2009 at 6:48
Apr 4, 2009 at 14:44 answer added Chris May timeline score: 11
Apr 4, 2009 at 14:35 answer added Yakov Fain timeline score: 1
Apr 4, 2009 at 14:29 answer added Emre Köse timeline score: 4
Apr 4, 2009 at 13:46 answer added cletus timeline score: 13
Apr 4, 2009 at 13:11 answer added Tom Hawtin - tackline timeline score: 24
Apr 4, 2009 at 11:42 answer added Nuoji timeline score: 4
Apr 4, 2009 at 8:49 answer added PhiLho timeline score: 1
Apr 4, 2009 at 6:41 answer added Apocalisp timeline score: 3
Apr 4, 2009 at 6:39 answer added Emmanuel Rodriguez timeline score: 2
Apr 4, 2009 at 6:36 answer added JesperE timeline score: 108
Apr 4, 2009 at 6:34 answer added cygil timeline score: 181
Apr 4, 2009 at 6:28 answer added RV. timeline score: -5
Apr 4, 2009 at 6:18 answer added Fortyrunner timeline score: 410
Apr 4, 2009 at 6:17 comment added CookieOfFortune Even if it's a single block of memory, it'd still only be around 1000 * 4 = 4kb worth, which is not a lot of memory.
Apr 4, 2009 at 6:15 comment added Fortyrunner I doubt that it would keep them in a single chunk of memory.
Apr 4, 2009 at 6:05 comment added euphoria83 No matt. I know this for C. I am guessing Java would use the same method.
Apr 4, 2009 at 6:04 answer added Warrior timeline score: 6
Apr 4, 2009 at 6:02 answer added CookieOfFortune timeline score: 6
Apr 4, 2009 at 6:01 comment added matt b "Since arrays keep all the data in a contiguous chunk of memory" do you have any sort of citation to back this up for Java?
Apr 4, 2009 at 6:00 answer added TofuBeer timeline score: 5
Apr 4, 2009 at 5:57 history asked euphoria83 CC BY-SA 2.5