This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LinkedList_deleteIndex { | |
public class LinkedList<E> { | |
private class Node{ | |
public E e; | |
public Node next; | |
public Node(E e, Node next){ | |
this.e = e; | |
this.next = next; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Test { | |
public static void main(String[] args) { | |
ExecutorService executor = Executors.newCachedThreadPool(); | |
Task task = new Task(); | |
Future<Integer> result = executor.submit(task); | |
executor.shutdown(); | |
try { | |
Thread.sleep(1000); | |
} catch (InterruptedException e1) { |
NewerOlder