Cognizant interview question

Java - Logic to print Inverted Pyramid