Polestar Interview Question

java,puzzle and alternate prime no