On line no no of stars
1 1
2 3
3 5
4 3
5 1


i cant but i want lean now.

i need more explanation on it.

i need more explanation on it.

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.

System.out.println() : Changes lines
System.out.print("*") : Prints '*' at the same line