Cognizant interview question

Ine Java they give me to code star pattern...(Triangle shape)