Factorial from 1 to 10 in java