Code Description (#24164)
"import java.util.ArrayList;" is a java code. It should be declared in "code theme". People may miss the "import package" code part since it is not discriminated from the other parts as a code part. If they miss the whole code will complain just because of this simple mistake. This way people wouldn't miss the code to import the package.pull/23887/head^2
parent
c21a5bef62
commit
d0758ab398
|
@ -6,7 +6,10 @@ title: ArrayList
|
|||
|
||||
The *Collection framework* consists of all interfaces and classes that can hold a set of values (similar to [arrays](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html)). **ArrayList** is a class that is in this hierarchy and known as a _**Collection object**_. It implements the *List* interface which in turn implements the *Collection* interface. This *Collection* interface can be found in the `java.util` package. You will need to import this package.
|
||||
|
||||
```java import java.util.ArrayList; //is more efficient than importing all of java.util```
|
||||
```java
|
||||
import java.util.ArrayList; // is more efficient than importing all of java.util
|
||||
```
|
||||
|
||||
|
||||
Always import the most specific package in order to save memory size and performance time.
|
||||
|
||||
|
|
Loading…
Reference in New Issue