
What is Jagged arrays in java and explain with example? urgent

hi friend,
A non uniform array is called Jagged array i.e. in a two dimensional array length of each row can vary. Feature of Jagged array is newly added to the Java. A matrix can be as follows :
00 01 02 10 11 21 31 32

hi friend,
Try this code
public class JaggedArrayExample
{
public static void main(String args[])
{
int jArray[][] = { {1, 2, 3, 4},
{5},
{6, 7},
{8, 9, 10}
};
System.out.println("\nMatrix : ");
for(int i = 0; i < jArray.length; i++)
{
for(int j = 0; j < jArray[i].length; j++)
{
System.out.print(jArray[i][j] + "\t");
}
System.out.println();
}
}
}