<prompt> Kujenga programu Java kwa ajili ya mahesabu ya factorical ya idadi  <response>: Here is a Java program that can calculate the factorial of a number:javaimport java.util.Scanner; public class Factorial public static void mainString args Scanner scanner new ScannerSystem.in; System.out.printEnter a number: ; int number scanner.nextInt; scanner.close; System.out.printlnThe factorial of number is: factorialnumber; public static long factorialint number long result 1; forint i 2; i number; i result i; return result; This program prompts the user to enter a number and uses the factorial function to calculate the factorial of the entered number. The result is then displayed to the user.You can compile this program by saving it in a file named Factorial.java and running the command javac Factorial.java. You can then run the program by running the command java Factorial and following the prompts. 