From: yeom Date: Wed, 2 May 2012 17:33:38 +0000 (+0000) Subject: fix: the return value declarations were missing in some method declarations in the... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=IRC.git;a=commitdiff_plain;h=4752a9f9ab6b7fd5a9c0dc4cad10459e8f60afa1;ds=sidebyside fix: the return value declarations were missing in some method declarations in the LinkedList class. so curious about how it could work well without having a compilation error. --- diff --git a/Robust/src/ClassLibrary/LinkedList.java b/Robust/src/ClassLibrary/LinkedList.java index 2923f400..7cd250ac 100644 --- a/Robust/src/ClassLibrary/LinkedList.java +++ b/Robust/src/ClassLibrary/LinkedList.java @@ -21,7 +21,7 @@ public class LinkedList { clear(); } - public add(Object o) { + public void add(Object o) { if( tail == null ) { head = new LinkedListElement(o, null, null); tail = head; @@ -33,7 +33,7 @@ public class LinkedList { size++; } - public addFirst(Object o) { + public void addFirst(Object o) { if( head == null ) { head = new LinkedListElement(o, null, null); tail = head; @@ -45,11 +45,11 @@ public class LinkedList { size++; } - public addLast(Object o) { + public void addLast(Object o) { add(o); } - public clear() { + public void clear() { head = null; tail = null; size = 0;