LinkedList Example
public class LinkedListExample { public static void main(String[] args){ //LinkedList => LinkedList LinkedList linkedList = new LinkedList (); linkedList.add(new Connection()); linkedList.add(new Connection("turtle",false)); for (int i =0; i itr = linkedList.iterator(); while (itr.hasNext()) { Connection conn = itr.next(); System.out.println("itr : "+conn.toString()); } System.out.println("before : "+linkedList.size()); System.out.println(linkedList.poll().toString()); System.out.println(linkedList.poll()); System.out.println("after : "+linkedList.size()); } } @ToString @Getter @Setter class Connection { private String name; private boolean isConnection; public Connection() { // TODO Auto-generated constructor stub this("test",true); } public Connection(String nm, boolean conn) { name = nm; isConnection =conn; } } =============================================...