View Single Post
Light Poster
6Sep2012,16:50  
Boaz's Avatar
hiiii,,
Thank you so much brother,,,,
Your Reply helped me lot.,!
My tutor wrote a code,,but i cant able to understand that,,,i'll write that code here,,plz have a loot at it,,and say what he have done in this code,,if possible yu give me a example in these kind of casting,!
Code:
//this is a program to add elements in an arraylist.
i dont knw wat they have done here,,,
Object O[]=al.toArray();
Interger j[]=new Integer[O.length];
int k[]=new int[O.length]
for(int i=0;i<O.length;i++)
{
j[i]=(Integer)O[i];
k[i]=j[i].intValue();
sum=sum+k[i];
System.out.println(k[i]);
}

plzz help me with this code....! thank you,!