Created
May 17, 2020 22:57
-
-
Save yenerm/89ac40cea24182ff4cd33671033f4ebd to your computer and use it in GitHub Desktop.
Java List <String>
This file contains 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
List<String> list = new ArrayList<>(); | |
list.add("First String"); | |
list.add(6); // Compile error | |
String str = list.get(0); // no cast needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment