public TwoDPoint(String s){
  StringTokenizer st=new StringTokenizer(s,",");
  x=Double.valueOf(st.nextToken());
  y=Double.valueOf(st.nextToken());
}

public TwoDPoint ( String s ) { StringTokenizer st = new StringTokenizer ( s , "," ) ; x = Double . valueOf ( st . nextToken ( ) ) ; y = Double . valueOf ( st . nextToken ( ) ) ; }
construct when given a comma - separated string of x , y values as double . < p > no serious error handling is considered , so be wary of passing in invalid values .
