Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Array has two elements; array.length returns 20

Tags:

java

arrays

I have an array of BufferedImage's. In the example breakpoint the array contains two elements. Anyway the length property returns the value of 20. How is that even possible?

eclipse debugger

like image 537
Herr Derb Avatar asked Feb 02 '26 04:02

Herr Derb


1 Answers

That seems like an IDE setting. It will only show the non-null elements in the array in debug view. Eclipse does this.

like image 121
Sotirios Delimanolis Avatar answered Feb 04 '26 16:02

Sotirios Delimanolis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!