Advertisement
_MuradPro_

TestRectangle

Sep 10th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. package MuradHomeWork;
  2.  
  3. public class TestRectangle {
  4.  
  5.     public static void main(String[] args) {   
  6.  
  7.     Rectangle rec1 = new Rectangle(10, 10);
  8.     Rectangle rec2 = new Rectangle(10, 20);
  9.     System.out.println("The biggest area is " + rec1.greaterArea(rec2));
  10.     System.out.println("The total area is " + Rectangle.totalArea());
  11.  
  12.     }
  13.    
  14. }
  15.  
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement