All pastes #616252 Raw Edit

Untitled

public java v1 · immutable
·published 2007-07-12 15:25 UTC
rendered paste body
import java.awt.Rectangle;public class RectangleIntersection {  public static void main (String [] args) {    Rectangle r1 = new Rectangle(0,4,4,4);    Rectangle r2 = new Rectangle(2,2,4,4);    Rectangle r3 = r1.intersection(r2);        System.out.println("Intersecting Box: (" + r3.getX() + "," + r3.getY() + ") Width: " + r3.getWidth() + " Height: " + r3.getHeight());      }}