Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Rectangle;
- public class FourRectanglePrinter
- {
- public static void main(String[] args)
- {
- Rectangle box = new Rectangle(10,20,30,50);
- System.out.println(box);
- box.translate(30,0);
- System.out.println(box);
- box.translate(0,50);
- System.out.println(box);
- box.translate(-30,0);
- System.out.println(box);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement