Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static boolean compareList(List<?> one, List<?> another) { if (one == null && another == null) { return true; } else if (one != null && another != null) { if (one.containsAll(another) && another.containsAll(one)) { return true; } } return false; } }