For each point use
StringTokenizer to get ordinates. Convert to Number using
Float.parseFloat method. You can store this number in an
ArrayList.
When you are done reading the file. Loop over the array list and add get sum of both the ordinates.
And Bingo !!