Polestar interview question

java,puzzle and alternate prime no