You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
536 B

public class TestParseString
{
public static void main(String[] args)
{
String s1 = "12.3,4.9 6,9 0,8";
ParseString ps1 = new ParseString(s1);
System.out.println("Sum of all number in \"" + s1 + "\" is: ");
System.out.println(ps1.sumOfAll());
System.out.println();
String s2 = "120,8 7.3,6.4 0.1,8.0";
ParseString ps2 = new ParseString(s2);
System.out.println("Sum of all number in \"" + s2 + "\" is: ");
System.out.println(ps2.sumOfAll());
System.out.println();
}
}