You must use the Scanner class in Java: The Scanner class is a class in java.util, which allows the user to read values of various types.
Here is the solution:
import java.util.Scanner;
public class Pr_01_RectangleArea {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Please write the first side of the rectangle:");
int sideOne = scanner.nextInt();
System.out.println("Please write the second side of the rectangle:");
int sideTwo = scanner.nextInt();
System.out.println("The area of your rectangle is:" );
System.out.println(sideOne * sideTwo);
}
}