advictoriam

Untitled

Nov 26th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. import java.awt.Rectangle;
  2.  
  3. public class AreaTester
  4. {
  5.    public static void main(String[] args)
  6.    {
  7.       Rectangle rect = new Rectangle(51, 1);
  8.       double area = rect.getWidth() * rect.getHeight();
  9.       System.out.println(area);
  10.       System.out.println("Expected: 51");
  11.    }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment