Answer the question
In order to leave comments, you need to log in
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
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.
if integer then somewhere 2 billion elements
System.out.println(Integer.MAX_VALUE)
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question