Calculate Rectangle Area with it's length and width.

 
public class Main {
  public static void main(String[] args) {
    int width = 5;
    int length = 10;
    int area = length * width;
    System.out.println("Area of a rectangle is " + area);
  }
}
 

The output:

 
Area of a rectangle is 50
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.