N
N
nikesport2015-01-13 14:54:58
Java
nikesport, 2015-01-13 14:54:58

How much is the maximum memory of an arraylist?

How many files (pictures (5 mb each)) can be uploaded to the arraylist?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
W
WildCherryCandy, 2015-01-13
@WildCherryCandy

If you don't run into computer memory (and you run into it, with 5MB pictures), then you run into integers, because, judging by the documentation, the get method of the ArrayList class takes an integer as an argument.

A
asd111, 2015-01-13
@asd111

if integer then somewhere 2 billion elements
System.out.println(Integer.MAX_VALUE)

N
Nikolai Pavlov, 2015-01-13
@gurinderu

I didn’t understand something, do you want to decompose the picture bit by bit and put it in an ArrayList or store the object itself in it?
ArrayList or ArrayList ?
The first option is fundamentally wrong.
In the second option, you can rest either on physical memory or on the size of int

Y
yanchumak, 2015-01-13
@yanchumak

his faster VM heap kicks off

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question