factorial should be initialize by '1' instead of '0' otherwise it will always return value 0 Project : fact.java