Infosys interview question

Core java and One simple program on printing pattern