How to find factorial of an integer value

This is the first solution to find the factorial of an integer value.

import java.util.Scanner;

public class Factorial {
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		@SuppressWarnings("resource")
		Scanner inpInt=new Scanner(System.in);		
		System.out.println("Enter a number");
		int numValue=inpInt.nextInt();
		int factValue=1;
		for (int i=2;i<=numValue;i++) {
			factValue=factValue*i;			
		}
		System.out.println("Factorial of "+ numValue+ " is " +factValue);					
	}
}
Output:
 Enter a number
 5
 Factorial of 5 is 120