get first element in hashset java code example
Example 1: java get first char
char fourth = "Banana".charAt(3);
Example 2: get first entry in set java
Set<Long> set = new LinkedHashSet<>();
set.iterator().next();
// LinkedHashSet guarantees insertion order