E e = list.get(list.size() - 1);
Guavaが使えるなら
lastElement = Iterables.getLast(iterableList);
参考
java - How to get the last value of Arraylist - Stack Overflow
Go to list of users who liked
More than 5 years have passed since last update.
E e = list.get(list.size() - 1);
Guavaが使えるなら
lastElement = Iterables.getLast(iterableList);
java - How to get the last value of Arraylist - Stack Overflow
Register as a new user and use Qiita more conveniently
Go to list of users who liked