java get first item in list code example
Example 1: java list get first element
list.get(0);
Example 2: java list get first element
set.iterator().next();
Example 3: java list get first element
!list_or_set.isEmpty()
list.get(0);
set.iterator().next();
!list_or_set.isEmpty()