@@ -0,0 +1,828 @@
+import java.util.Scanner;%0A%0Apublic class Factorial %7B%0A   private static long factorial(int num) throws NegativeNumberException %7B%0A       if (num %3C 0)%0A           throw new NegativeNumberException();%0A           %0A       if(num == 0)%0A           return 1;%0A%0A       else%0A           return num * factorial(num - 1);%0A   %7D%0A%0A   public static void main(String%5B%5D args) %7B%0A       Scanner scanner = new Scanner(System.in);%0A       boolean wrongInput = true;%0A%0A       while (wrongInput) %7B%0A           System.out.print(%22Enter n = %22);%0A           int input = Integer.parseInt(scanner.nextLine());%0A           try %7B%0A               long result = factorial(input);%0A               System.out.print(%22n! = %22 + result);%0A               wrongInput = false;%0A           %7D catch (NegativeNumberException nne) %7B%0A               nne.what();%0A           %7D%0A       %7D%0A   %7D%0A%7D%0A

Create Factorial.java