Ragged and Jagged Arrays

Nitesh Verma picture Nitesh Verma · Aug 16, 2013 · Viewed 34.6k times · Source

What is the difference between ragged and jagged arrays? As per my research both have the same definitions, i.e. two-dimensional arrays with different column lengths.

Answer

Gerret picture Gerret · Aug 16, 2013

Your question already says the correct answer ^^ but for completeness.

A Jagged or also called Ragged array is a n-dimensional array that need not the be reactangular means:

int[][] array = {{3, 4, 5}, {77, 50}};

For more examples you could look here and here!