Initialization of an ArrayList in one line example

You may also like...

2
Leave a Reply

avatar
2 Comment threads
0 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
Mohammeducok Recent comment authors
  Subscribe  
newest oldest
Notify of
ucok
Guest
ucok

wow, this is actually very informative

Mohammed
Guest
Mohammed

You can also use Google Guava:

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

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