+1

How many elements can store an array. What is the limit of an array in java ruby python. Which language can store more elements.

11/16/2019 2:40:56 AM

B.Balaji

3 Answers

New Answer

+1

B.Balaji. like i said, there is not an exact number. for example, the javas heap size determines the amount of values you can store in an array. so theoretically speaking, java is integer based, and if you had enough memory(as in RAM), say 256gb or more, you could store(hypothetically) up too 2,147,483,647(the max intger value) values in an array. sorry.

+1

well... not exactly a fixed limit. in java : https://stackoverflow.com/questions/674186/making-a-very-large-java-array in ruby: https://stackoverflow.com/questions/3687517/array-size-too-big-ruby#3688388 in python: https://stackoverflow.com/questions/855191/how-big-can-a-python-list-get#855455 so from reading those u can see its more of a Computers in Systems Question, and if i were choosing a language for large data reasons, i would choose something fast... it would probably be best if you stored your data on a file and just read/write from that... hope this helps you

+1

Thank you for helping me.