This is a very poorly worded paragraph, but if you interpret it freely, it’s correct.
In your example, the size of the array is known at compile time. Size size .
You interpret “known at compile time” with “static” or “constant”, which is understandable. Of course, as we know, the JVM allocates memory dynamically based on the size value.
Perhaps the author is trying to distinguish between an array and something like ArrayList , where sizes do not have to be specified during initialization.
source share