java collection tutorial code example Example: how to define a collection in java List list = Arrays.asList("Lars", "Simon");