From 23cc43c3011f826361049f1a76e585f60104b8d9 Mon Sep 17 00:00:00 2001 From: Randy Janecek Date: Sat, 11 May 2019 12:25:33 -0400 Subject: [PATCH] Fixed typo, improved readability. (#32580) --- guide/english/java/arraylist/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/english/java/arraylist/index.md b/guide/english/java/arraylist/index.md index 759cf1bbbc..d8c77ec4d4 100644 --- a/guide/english/java/arraylist/index.md +++ b/guide/english/java/arraylist/index.md @@ -19,7 +19,7 @@ Always import the most specific package in order to save memory size and perform ArrayList names = new ArrayList<>(); ArrayList ages = new ArrayList<>(5); ``` - + In the above snippet, the angle brackets `<>` take a generic data type as argument specifying data type of the elements in the ArrayList. The first ArrayList `names` is specified as containing *String* elements. Thus, it will only be allowed to contain String elements. Its size is not specified so it will have a default size of 10. The second ArrayList `ages` has specified that it will only hold integers. But ArrayList cannot hold primitives, it only holds objects. Thus to make it store integers, floats, etc., we can use wrapper classes. `names` will have a specified size of 5. Since ArrayList implements *List*, an ArrayList can be created using the following syntax: