import java.util.*; class UseArrayLists13 { // Shows the two different remove methods in class ArrayList // using arrayList of String. public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); System.out.println("\nEnter some words (all on one line, separated by spaces):"); String line = input.nextLine(); String[] words = line.split(" +"); ArrayList a = new ArrayList(); for(int i=0; i