File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,10 @@ public static void main(String[] args) {
8585 l1 .insert (x );
8686 l1 .delete (x );
8787 if (l2 .eqTo (l1 ) == false ) {
88- System .out .println ("error" );
88+ System .out .println ("error" );
89+ } else {
90+ System .out .println ("ok" );
8991 }
92+ System .out .println ("Done!" );
9093 }
9194}
Original file line number Diff line number Diff line change @@ -88,7 +88,9 @@ void insert(int x) {
8888 }
8989 }
9090
91- OrderedList copy () {
91+ // Contravariant return type, not supported by Java 1.4
92+ // OrderedList copy() {
93+ BasicList copy () {
9294 OrderedList t = new OrderedList ();
9395 int i = 0 ;
9496 t .size = size ;
@@ -113,6 +115,9 @@ public static void main(String[] args) {
113115 l1 .delete (x );
114116 if (l2 .eqTo (l1 ) == false ) {
115117 System .out .println ("error" );
118+ } else {
119+ System .out .println ("ok" );
116120 }
121+ System .out .println ("Done!" );
117122 }
118123}
You can’t perform that action at this time.
0 commit comments