import java.util.ArrayList; import java.util.Collection; public class CollectionInterfaceRemoveAllMethod { public static void main(String[] args) { Collection collection = new ArrayList(); collection.add("India"); collection.add("Shrilanka"); collection.add("Pakistan"); boolean result = collection.removeAll(collection); if(result==true){ System.out.print("All Elements Remove."); } else{ System.out.print("All Elements Not Remove."); } } }