原创 es構建客戶端訪問服務端數據時報NoNodeAvailableException[None of the configured nodes are available: [{#transport#
報錯詳情如下: NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{_sl7VF2cTb-iU0F9-UYqtQ}{域
原创 增強for循環或迭代器循環特定場景下刪除元素不會造成ConcurrentModificationException
先貼ArrayListL裏面 private class Itr implements Iterator<E> { int cursor; // index of next element to return
原创 foreach和iterator底層字節碼邏輯一模一樣,可替換使用
public static void main(String[] args) { List<String> list = Collections.emptyList(); for (String s: