Thanks for your help NORM :D
U are a great MAN :D
Type: Posts; User: Medo Almasry
Thanks for your help NORM :D
U are a great MAN :D
Outside the bounds of array length discussion...
Is there anyway to create an array an put in it the values of another array without the zeros...
P.S. I know am getting on ur nerves but my exam...
The last for loop is supposed to convert unique[]
12 32 14 35 89 16 120 9 0 8 17 0 0 36
to union[]
12 32 14 ...
The altering at the end is not much of an issue to me as much as getting the right output...
everything goes right till the last for loop...
I'm trying to copy the whole array into a new one...
ok u were right I should've started the counter with 0 instead of one...
and i changed the length of both arrays union and unique to 14...
but now it gives me
FOR UNION :
12 32 ...
I already checked the first 2 for loops and the print the right data... (which add both arrays into one new array)
but starting int x = 0;
and the two while loops inside each other which are meant...
public class array{
public static void main(String args []){
int list1[] = {12, 32, 14, 35, 89, 16, 120};
int list2[] = {9, 12, 8, 17, 120, 35, 36};
Union(list1, list2);...
U can ignore the method Intersection(), it works fine...
public class array{
public static void main(String args []){
int list1[] = {12, 32, 14, 35, 89, 16, 120};
int list2[] = {9, 12, 8, 17, 120, 35, 36};
Union(list1, list2);...