Capgemini interview question

Code factorial program and so.e basic Java questions