Fexle Services interview question

Program to print patterns in java.