3 ms·
Java's arrays use a signed 32-bit int as their length, so the longest they can be is about 2 billion elements. If your code has arrays over a billion elements,
by angus_gh 2y ago
Java's arrays use a signed 32-bit int as their length, so the longest they can be is about 2 billion elements.
If your code has arrays over a billion elements, then it will fall over the moment someone inputs slightly larger data