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());
    } 
}