import java.util.Scanner;
public class Factorial {
public static void main(String[] args) {
Scanner bob = new Scanner(System.in);
System.out.println("Please enter your integer.");
int factorial = bob.nextInt();
int counter = factorial;
while (counter == 0)
factorial = factorial * (counter - 1);
counter--;
System.out.println(factorial);
}}
This is in java. Could someone tell me why it doesn't work.