no you don't. you gave all the explanation to find the answer in your first post:
it's a PATTERN that you want to PRINT
there are only very basic techniques used there, no doubt your teacher showed you those.
2 for loops.
Outer: 1 to 5 for the lines.
Inner: Depending on the index of the first loop you will decide how many stars will be printed. The number of stars will be the number of times the inner loop will run.
Also: System.out.println() : Changes lines System.out.print("*") : Prints '*' at the same line