Added *.class to .gitignore
Solved problem3 in java