public static int[] copyOf(int[] original, int newLength): Copies the specified array and length. It truncates the array if provided length is smaller and pads if provided.

This sentence is from the field of programming - arrays. What does pads mean in this context? Which other word could there be used with the same meaning?

1 Answer 1


It is a computer programming term.

If the source length is greater than the target size, it is truncated. That means any extra characters are ignored.

If the source length is shorter than the target size, the target is typically padded with spaces to the required length.

This means that space characters are inserted to fill the target to the required length.

An alternative word for pad could be fill.

For a numerical value the padding could be with zeroes.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .