I am using the String split method and I want to have the last element. The size of the Array can change.
Example:
String one = \"Dü
With Guava:
final Splitter splitter = Splitter.on("-").trimResults(); assertEquals("Günnewig Uebachs", Iterables.getLast(splitter.split(one))); assertEquals("Madison", Iterables.getLast(splitter.split(two)));
Splitter, Iterables