|
|
@ -4,7 +4,6 @@ public class ParseString{ |
|
|
this.str = str; |
|
|
this.str = str; |
|
|
} |
|
|
} |
|
|
public double sumOfAll(){ |
|
|
public double sumOfAll(){ |
|
|
//String new_str = this.str.replaceAll(" +",","); |
|
|
|
|
|
String[] parts = this.str.split(",| +"); |
|
|
String[] parts = this.str.split(",| +"); |
|
|
double total = 0; |
|
|
double total = 0; |
|
|
for (int i = 0; i < parts.length; i ++){ |
|
|
for (int i = 0; i < parts.length; i ++){ |
|
|
|