public class UsePoint {

  // Take a point toFlip, and return a new Point whose x value
  // is the negation of p's x value
  public static Point flipX(Point toFlip) {
    Point flipped = new Point();
    flipped.x = toFlip.x * -1;
    flipped.y = toFlip.y;
    return flipped;
  }

  public static void main(String[] args) {
    Point p = new Point();
    p.x = 10;
    p.y = 11;

    Point after = flipX(p);
    System.out.println(after.x + ", " + after.y);
  }

/*

  public static void flipX(Point toFlip) {
    toFlip.x = toFlip.x * -1;
    toFlip.y = toFlip.y;
  }

  public static Point flipX(Point toFlip) {
    toFlip.x = toFlip.x * -1;
    toFlip.y = toFlip.y;
    return toFlip;
  }


  public static Point flipX(Point toFlip) {
    Point flipped = toFlip;
    flipped.x = toFlip.x * -1;
    flipped.y = toFlip.y;
    return flipped;
  }


*/
}
johncasabar@gmail.com -- Security vuln from if

