Initialization of an ArrayList in one line example

You may also like...

Subscribe
Notify of
guest
2 Comments
Oldest
Newest
Inline Feedbacks
View all comments
ucok
ucok
May 18, 2018 07:07

wow, this is actually very informative

Mohammed
Mohammed
August 15, 2018 09:18

You can also use Google Guava:

import org.python.google.common.collect.Lists;

List<String> conditions = Lists.newArrayList("Earth", "Mars", "Venus");

2
0
Would love your thoughts, please comment.x
()
x