// // a method areaOfRect that receives length and width, and // returns its area of the rectangle import java.util.Scanner; import java.text.DecimalFormat; class CalAreaOfRect { public static void main(String[] args) { DecimalFormat f1 = new DecimalFormat("0.0"); Scanner input = new Scanner(System.in); double len = input.nextDouble(); double wid = input.nextDouble(); double area = AreaOfRect(len, wid); System.out.println("Area = " + area); System.out.println("\n\n\n"); } //---------------------------- private static double AreaOfRect(double length, double width) { double area = length * width; return area; } }