String []
public static string[] Hebingarray (string[] a,string[] b) {
String[] C = new STRING[A.LENGTH+B.LENGTH-CF (b) * *];
int index = 0;
for (int i=0;i<a.length;i++)
{
if (!isexist (B,a[i]))
{
c[index++] = A[i];
}
}
for (int i=0;i<b.length;i++)
{
if (!isexist (A,b[i]))
{
c[index++] = B[i];
}
}
return C;
}
public static int CF (string[] a,string [] b) {
int num = 0;
for (int i=0;i<a.length;i++)
{
if (Isexist (B,a[i]))
{
num++;
}
}
return num;
}
public static Boolean isexist (string[] a,string s) {
Boolean d = false;
for (int i=0;i<a.length;i++)
{
if (S==a[i])
{
D = true;
}
}
return D;
}
int []
public static int[] Hebingarray (int[] a,int[] b) {
Int[] C = new INT[A.LENGTH+B.LENGTH-CF (b) * *];
int index = 0;
for (int i=0;i<a.length;i++)
{
if (!isexist (B,a[i]))
{
c[index++] = A[i];
}
}
for (int i=0;i<b.length;i++)
{
if (!isexist (A,b[i]))
{
c[index++] = B[i];
}
}
return C;
}
public static int CF (int[] a,int [] b) {
int num = 0;
for (int i=0;i<a.length;i++)
{
if (Isexist (B,a[i]))
{
num++;
}
}
return num;
}
public static Boolean isexist (int[] A,int s) {
Boolean d = false;
for (int i=0;i<a.length;i++)
{
if (S==a[i])
{
D = true;
}
}
return D;
}
Test
public static void Main (string[] args) {
Int
Int[] a={10,20,30,40,50};
Int[] b={10,20,40};
Int[] C=hebingarray (A, b);
for (int i=0;i<c.length;i++)
{
System.out.print (c[i]+ "");
}
String
String[] a={"10", "20", "30", "40", "50"};
String[] b={"10", "20", "40"};
String[] C=hebingarray (A, b);
for (int i=0;i<c.length;i++)
//{
System.out.print (c[i]+ "");
//}
}
How to merge two arrays and delete the same elements