Removing some values from the List in Java Example

Remove one List value from another list: Java Program to Remove List Values from another List values: In this program we are deleting the list2 values from list1. package in.javadomain; import java.util.ArrayList; import java.util.List; public class RemoveListValue { public static void main(String[] args) { List<String> myList1 = new ArrayList<String>(); myList1.add("Java"); myList1.add("PHP"); myList1.add("C"); List<String> myList2 = new ArrayList<String>(); myList2.add("Java"); myList2.add("PHP"); System.out.println("List […]

 1,266 total views,  8 views today

» Read more