@@ -20,7 +20,7 @@ public void append(Object val) {
2020
2121 String value = new String ();
2222
23- value += String . valueOf ( val ) ;
23+ value += "" + val ;
2424
2525 for (int i = 0 ; i < value .length (); i ++) {
2626
@@ -147,7 +147,7 @@ public Object get(int index) {
147147
148148 if (i == index ) { // if the current element is the one we want
149149
150- for (int j = k ; this .Values .charAt (j ) != '¢' ; k ++) { // j is the index of the current character in the element
150+ for (int j = k ; this .Values .charAt (j ) != '¢' ; j ++) { // j is the index of the current character in the element
151151
152152 result += this .Values .charAt (j );
153153
@@ -165,7 +165,9 @@ public Object get(int index) {
165165 }
166166
167167 if (result .startsWith ("null" )) {
168+
168169 result = result .substring (4 );
170+
169171 }
170172
171173 if ("true" .equals (result ) || "false" .equals (result )) {
@@ -334,7 +336,9 @@ public void insert(int index, Object val) {
334336 String value = null ;
335337
336338 if (value == null ) {
337- value = String .valueOf (val );
339+
340+ value = "" + val ;
341+
338342 }
339343
340344 for (int i = 0 ; i < value .length (); i ++) {
@@ -360,7 +364,7 @@ public void show() {
360364
361365 for (int i = 0 ; i < this .len (); i ++) {
362366
363- System .out .print (String . valueOf ( this .get (i ) ) + ", " );
367+ System .out .print (this .get (i ) + ", " );
364368
365369 }
366370
@@ -378,7 +382,7 @@ public double sum() {
378382
379383 try {
380384
381- sum += (double ) Double .valueOf (String . valueOf ( this .get (i ) ));
385+ sum += (double ) Double .valueOf ("" + this .get (i ));
382386
383387 } catch (NumberFormatException e ) {
384388
@@ -433,9 +437,9 @@ public double min() {
433437
434438 try {
435439
436- if (((double ) Double .valueOf (String . valueOf ( this .get (i ) ))) < min ) {
440+ if (((double ) Double .valueOf ("" + this .get (i ))) < min ) {
437441
438- min = (double ) Double .valueOf (String . valueOf ( this .get (i ) ));
442+ min = (double ) Double .valueOf ("" + this .get (i ));
439443
440444 }
441445
@@ -472,9 +476,9 @@ public double max() {
472476
473477 try {
474478
475- if (((double ) Double .valueOf (String . valueOf ( this .get (i ) ))) > max ) {
479+ if (((double ) Double .valueOf ("" + this .get (i ))) > max ) {
476480
477- max = (double ) Double .valueOf (String . valueOf ( this .get (i ) ));
481+ max = (double ) Double .valueOf ("" + this .get (i ));
478482
479483 }
480484
0 commit comments