Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Rectangle;
- public class excercise1 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Rectangle box = new Rectangle(100, 100, 50, 50);
- double width = box.getWidth();
- double height = box.getHeight();
- double areaRect = height * width;
- System.out.println(areaRect);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment