Java Array Intersect intersectArrays(int[] targetArray, int[] selfArray)

Here you can find the source of intersectArrays(int[] targetArray, int[] selfArray)

Description

intersect Arrays

License

Open Source License

Declaration

private static boolean intersectArrays(int[] targetArray,
            int[] selfArray) 

Method Source Code

//package com.java2s;

public class Main {
    private static boolean intersectArrays(int[] targetArray,
            int[] selfArray) {
        for (int i : targetArray) {
            for (int j : selfArray) {
                if (i == j) {
                    return true;
                }/*from   www.  j a va2s  . co  m*/
            }
        }

        return false;
    }
}

Related

  1. intersect(String[] arr1, String[] arr2)
  2. intersect(String[] list1, String[] list2)
  3. intersect(T[] a, T[] b)
  4. intersect(T[] a, T[] b)
  5. intersectArrays(int[] a, int[] b)
  6. intersection(final long[] array1, final long[] array2)
  7. intersection(int[] array1, int[] array2)
  8. intersection(String[] ary1, String[] ary2)
  9. intersection(String[] ss1, String[] ss2)