How to split number using a separator in java
<p>i have an input  in a file where i have some numbers in the format </p>

<p>106,648|403,481
747,826|369,456
758,122|365,637
503,576|808,710
325,374|402,513</p>

<p>not i want to format the number as 
106,648
403,481
747,826
.. 
and so on  but  i  am unable to do this i have done this so  far </p>

<pre><code>public class MidPointSum {

public static void main(String[] args) {

    File file=new File("D:/midpoint.txt");

    try{

        Scanner sc=new Scanner(file);

            while(sc.hasNext()){

                String value=sc.next();

                String getVal[]=value.split("|");
                for(int i=0;i&lt;getVal.length;i++){

                    System.out.println(getVal[i]);
                }

            }

    }catch(FileNotFoundException e){
        System.err.println("File is not Found");
    }catch (Exception e){
        System.err.println("Another Exception");
    }

}
</code></pre>

<p>but i am not getting the desired output.Please someone help me ..</p>
