الرجوع
تسجيل الدخول

What will the output be?

class Rectangle {
    private int length;
    private int width;

    public void setDimensions(int length, int width) {
        this.length = length;
        this.width = width;
    }

    public int getArea() {
        return length * width;
    }
}

public class Test {
    public static void main(String[] args) {
        Rectangle rect = new Rectangle();
        rect.setDimensions(5, 10);
        System.out.println(rect.getArea());
    }
}