fetch element from list and add it in string code example Example: how to get elements of a list in java int num = list.get(0);