Java Generics

Generic Method 如果可以使用泛型方法来替代整个类的泛型化就应该使用泛型方法 static方法无法访问泛型类的类型参数,所有static方法需要使用泛型能力

ArrayList Source Code

ArrayList public E remove(int index) public E remove(int index) { rangeCheck(index); modCount++; E oldValue = elementData(index); int numMoved = size - index - 1; if (numMoved > 0) System.arraycopy(elementData, index+1, elementData, index, numMoved); elementData[--size] = null; // clear to let GC do its work return oldValue; } remove 移除index位置的元素: 首先计算index

Hugo Pitfall

Setting config baseurl should be set with https:// not http:// And the url should point to your blog site without the github link. e.g. baseURL: https://xxxx.github.io/