Skip to content

Instantly share code, notes, and snippets.

@isauravmanitripathi
Created April 2, 2019 19:19
Show Gist options
  • Save isauravmanitripathi/4fc3248b88746af8c8c1075968780748 to your computer and use it in GitHub Desktop.
Save isauravmanitripathi/4fc3248b88746af8c8c1075968780748 to your computer and use it in GitHub Desktop.
import java.awt.Point;
public class SetPoints {
public static void main(String [] args) {
Point location = new Point(4, 13);
System.out.println("Starting location: ");
System.out.println("X equals " + location.x);
System.out.println("Y equals " + location.y);
System.out.println("\nMoving to (7, 6)");
location.x = 7;
location.y = 6;
System.out.println("Ending location: ");
System.out.println("X equals " + location.x);
System.out.println("Y equals " + location.y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment