Created
March 22, 2019 18:21
-
-
Save z3t0/3d726b52ea1f3a6b7936a7b6086db3a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// trying to convert an arraylist T to an array of T | |
// this works | |
List<String> list = new ArrayList<>(); | |
String[] a = list.toArray(new String[0]); | |
// why doesn't this? | |
arr = unsorted.toArray(new T[0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment