Answer:
import java.util.Scanner;
public class CubeSurfaceArea {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); // create a Scanner object to read input from the user
System.out.print("Enter the length of the edge: ");
int length = sc.nextInt(); // read an integer input from the user and store it in the variable length
int surfaceArea = 6 * length * length; // calculate the surface area of the cube using the formula 6 * length * length
System.out.println("The surface area of the cube is " + surfaceArea + "."); // print the surface area to the console
}
}