Factorial in java, recursive and loop versions.