public static void remove(mtproject2 list1, mtproject2 list2, mtproject2 list3) { int a, b, c, d; a = list1.checkforfirst(); b = list2.checkforfirst(); c = list3.checkforfirst(); d = LLdetermination(a, b, c); if (d == 1) { list1.deletingfirst(); System.out.println("Removed" + " " + a); } else if (d == 2) { list2.deletingfirst(); System.out.println("Removed" + " " + b); } else if (d == 3) { list3.deletingfirst(); System.out.println("Removed" + " " + c); } else { System.out.println("Remove called on empty lists"); } }