added java program and .gitignore file