int a[] = {1, 2, 3}; int b[] = {4, 5, 6}; int c[] = {7, 8, 9};
Object arr[] = new Object[4]; arr[0] = a; arr[1] = b; arr[2] = c; i have arrays like this, now i want to print the values of array a,b,c from the array arr can any one help me please
Hi dude it's just an example code. See the value of d[] is initilized to arr[0].
Basically i thought sathiya moorthy needs to know the concept of casting an array from Object. Hence the code depicting this line "int d[] = (int[]) arr[0];" gets the int[] from the Object[] . [ April 06, 2005: Message edited by: Srinivasa Raghavan ]