how to write an arryalist in java code example Example: how to import an arraylist in java import java.util.ArrayList;