Code example for Scanner

Methods: nextDouble

0
        return Math.sqrt(PX * PX + PY * PY);
    } 
 
    public GraphPoint fromString(String data) {
        data = data.replace(',', ' ');
        Scanner _ = new Scanner(data);
        return new GraphPoint(_.nextDouble(), _.nextDouble());
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE