how to acess element in the list in java code example Example: how to get elements of a list in java int num = list.get(0);