1Rogue

Testing

Feb 11th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. // More efficient - 894 ns
  2. List<String> list = new ArrayList<>();
  3. for (String s : rawArgs) {
  4. list.add(s);
  5. }
  6.  
  7.  
  8. // Than this - 1340 ns
  9. List<String> list = new ArrayList<>();
  10. list.addAll(Arrays.asList(rawArgs));
Advertisement
Add Comment
Please, Sign In to add comment