Question & Answer: why my java eclipse out like this ,this program runnable on mac.. public class AreaRectangle { public static void main (String[] args) { double length = 0: double width = 0: double…..

File Edit Source Refactor Navigate Search Project Run Window Help package Explorer E l E D Methods java D AreaRectangle,java 4 public class AreaRectangle Lab5 Lab5A 6e public static void main (String[] args) double length 0; double width 03 10 double area 11 length Length length 12 width width(width) 13 area length, width) 14 15 display Data (length, width, area); 16 17 System, exit(0); 18 19 21e public static double length (double length) Scanner keyboard new Scanner(system.in); System.out.print Enter the your length 23 return length keyboard. 25 26 27e public static double width (double width) Scanner keyboard new Scanner(System.in 29 System.out.print Enter the your width: return width keyboard.nextDouble() 31 20 public static double area (double length double width)f double area 33 area length width 35 36 System, out.println(area) 37 return area 39e public static double displayData (double length, double width, double area System out println(the data of this program includes length +length+ width width Area area 41 return area 43 45 46 47 Problems Javadoc Declaration Console X terminated ngle (1) Java Application) D UDKMbi avaw.exe (2017 F6A1B 12:08:03 Area Rectangle Quick Access Task List Find q A Activa outline v AreaRectangle e s main(StringOD void s length doubl do width double) do rea (double, doub display Data (doublwhy my java eclipse out like this ,this program runnable on mac..

public class AreaRectangle { public static void main (String[] args) { double length = 0: double width = 0: double area: length = Length (length): width = width(width): area = area (length, width): displayData (length, width, area): System, exit(0): } public static double length (double length){ Scanner keyboard = new Scanner(system.in): System.out.print (“Enter the your length: “): return length = keyboard.nextDouble(): } public static double width (double width){ Scanner keyboard = new Scanner(System.in): System.out.print (“Enter the your width: “): return width = keyboard.nextDouble();} public static double area (double length double width){ double area: area = length * width: System, out.println(area) return area: } public static double displayData (double length, double width, double area){ System out println(“the data of this program includes length “+length+” width” +width +”Area” + area): return area: } }

Expert Answer

 /* According to your image there is some another class Methods .java. remove it and recompile it.

Your code is correct and running in my IDE intelliJ and Eclipse both perfectly. So try to reconfigure your ide. Problem may solved.

still you face problem. Leave comment. thanks.

*/

//This is your program

import java.util.Scanner;

public class AreaRectangle {

    public static void main(String[] args) {
   double length=0;
   double width=0;
   double area;
   length = length(length);
   width=width(width);
   area = area(length,width);
   displayData(length,width,area);
   System.exit(0);
    }
    public static double length(double length)
    {
        Scanner keyboard = new Scanner(System.in);
        System.out.println("Enter the your length: ");
        return length=keyboard.nextDouble();
    }
    public static double width(double width) {
    Scanner keyboard = new Scanner(System.in);
    System.out.println("Enter the your width: ");
    return width = keyboard.nextDouble();
    }
    public static double area(double length, double width)
    {
        double area;
        area = length*width;
        System.out.println(area);
        return area;
    }
    public static double displayData(double length, double width, double area)
    {
        System.out.println("The data of this program includes length "+length+ " width "+width+ " Area "+area);
        return area;
    }
}

//Output:—>

Still stressed from student homework?
Get quality assistance from academic writers!