Snippet 1
//create ArrayList
ArrayList arrayList = new ArrayList();
//add item to ArrayList
arrayList.add("item");
//check if ArrayList contains item (returns boolean)
System.out.println(arrayList.contains("item"));
//remove item from ArrayList
arrayList.remove("item");
Similar Snippets
Find Duplicates In Arraylist Java Code Example – java
Creating Java Main Method Code Example – java
Java Creat A Folder Code Example – java
Copyright © Code Fetcher 2020