Java
Arrays in Java
An array is a fixed size object holding elements of one type, indexed from zero, with the length fixed at creation.
One and multi dimensional arrays, String, the string pool and builders.
4 notes
An array is a fixed size object holding elements of one type, indexed from zero, with the length fixed at creation.
Java has no true two dimensional array. It has arrays of arrays, which is what makes jagged shapes possible.
String is an immutable object with a shared literal pool, and both facts explain how comparison, concatenation and performance behave.
When text is built piece by piece, a mutable buffer avoids the copying that repeated String concatenation forces.