SHARE
TWEET

Untitled

a guest Oct 13th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // traditional method
  2. ArrayList<String> list = new ArrayList<String>();
  3. list.add("A");
  4. list.add("B");
  5. list.add("C");
  6.  
  7. // one-line method
  8. ArrayList<String> list = new ArrayList<>(Arrays.asList("A","B","C"));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top