Java List First Item hasSameElement(List firstList, List secondList)

Here you can find the source of hasSameElement(List firstList, List secondList)

Description

has Same Element

License

Apache License

Declaration

private static boolean hasSameElement(List<Integer> firstList, List<Integer> secondList) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    private static boolean hasSameElement(List<Integer> firstList, List<Integer> secondList) {
        for (Integer element : firstList) {
            if (secondList.contains(element)) {
                return true;
            }//www.j a  v  a2 s.  co m
        }
        return false;
    }
}

Related

  1. getListBetween(String inputStr, String first, String second, List list)
  2. getNFirstBytes(int n, List byteList)
  3. getOnlyFirst(List obj)
  4. getPage(List all, int first, int pageSize)
  5. getStringFirstResult(List> llo, String reason)
  6. isFirst(List list, V object)
  7. isFirstAnnotationOfMethod(List lines, int lineNumber)
  8. isFirstPage(List pageLines, List> rawPages)
  9. isInOrder(List src, Object first, Object second)