Here you can find the source of compareTwoListOfStrings(List
public static boolean compareTwoListOfStrings(List<String> first, List<String> second)
//package com.java2s; /*/*from w w w.j a va2s .c o m*/ * CollectionUtil.java * Copyright (c) 2014, CODEROAD, All Rights Reserved. * * This software is the confidential and proprietary information of CODEROAD * ("Confidential Information"). You shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement you entered into with * CODEROAD. */ import java.util.List; public class Main { public static boolean compareTwoListOfStrings(List<String> first, List<String> second) { boolean result = false; int contCompare = 0; for (int i = 0; i < first.size(); i++) { String data = first.get(i); if (data.equals(second.get(i))) { contCompare++; } } if (contCompare == first.size()) { result = true; } return result; } }