Using while loops and variables in a Java program Challenge

Challenge: create a program that creates the output shown below exactly as displayed using a loop and counter.
(The trick is to know when to use System.out.print and when to use System.out.println. The last line must be printed differently from the others so does it belong in the loop?)