added a java project

problem statement is in the pdf