This will not work for n=0

public static int Fact(int n) {
if(n==1) {
return 1;
}
int fnm1=Fact(n-1);
int fn=n*fnm1;
return fn;
}
instead of writting the above can we wrtite the below one

public static int Fact1(int n) {
if(n==0) {
return 1;
}
return(n*Fact1(n-1));