View Single Post
  #1 (permalink)  
Old 08-01-2007, 07:35 AM
barney barney is offline
Member
 
Join Date: Jul 2007
Posts: 40
barney is on a distinguished road
Remove the bucket represented by the int from array
Hi, I need to take a char array and an int as parameters and remove the bucket represented by the int from the array. this is what i have so far
Code:
static char[] removeArray (char[] x, int e) { char[] result = new char[x.length-1]; for (int i = 0; i < result.length; i++) { if (i == e) result[e] = if (i < e) result[i] = x[i]; if (i > e) result[i] = x[i+1]; } }
I'm not sure about this part
Code:
if (i == e) result[e] =
how do i tell it to get rid of the char at int e?
Thanks
Reply With Quote
Sponsored Links