All pastes #616255 Raw Edit

Untitled

public java v1 · immutable
·published 2007-07-12 15:27 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()+") W: "+r3.getWidth()+" H: "+r3.getHeight());      }}