コードの何が問題になっていますか? スキャナー部分にエラーがあります。「詳細を追加する必要があります4この質問を投稿できるので、これで終わりです。
import java.util.Scanner
class rectangle
{
double width;
double length;
double findArea(double a, double b)
{
width=a;
length=b;
return a*b;
}
}
public class area
{
public static void main(String args[])
{
{
System.out.println("Enter the dimensions of the square.");
Scanner x = new Scanner(System.in);
Scanner y = new Scanner(System.in);
}
{
rectangle objrect = new rectangle();
System.out.println(objrect.findArea(x, y));
}
}
}