java get an element from a list code example Example 1: how to get elements of a list in java int num = list.get(0); Example 2: java string[] list get java string[] list get