Skip to content

Commit 8428bea

Browse files
committed
Update README.md
1 parent 7420a54 commit 8428bea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ One detail about Java: You can't instantiate an array of T[], so you have to in
5151
* Next we'll look at the method that adds elements to the list. Here's my implementation of `add`:
5252

5353
```java
54-
public boolean add(E e) {
54+
public boolean add(E element) {
5555
if (size >= array.length) {
5656
// make a bigger array and copy over the elements
5757
E[] bigger = (E[]) new Object[array.length * 2];
5858
System.arraycopy(array, 0, bigger, 0, array.length);
5959
array = bigger;
6060
}
61-
array[size] = e;
61+
array[size] = element;
6262
size++;
6363
return true;
6464
}

0 commit comments

Comments
 (0)