You can compare your commented code with mine.
Pay attention to the uppercase and lowercase characters and don't forget the semi-colons ( ; ) in Java.
Use a string to build the pyramid. A newline ("\n") is added for each level.
New assignment for you... can you write code to show the pyramid upside-down (5 asterisks on the first line, 4 on the second line,...)?
Sub Button1_Click
EditText1.text = myCreatePyramid(5)
End Sub