In python, to print
******
*****
****
***
**
*
*
**
***
****
*****
******
We would code the following:
for e in range (11,0,-1):
print((11-e) * ' ' + e * '*')
print ('')
for g in range (11,0,-1):
print(g * ' ' + (11-g) * '*')
My question is, can this be done in Java as well?
Java doesn't let you multiply a string (int) times, e.g. 4 * " "
, so how can we implement this in java?
huge important edit: guys sorry I screwed up the example output up there. i.e. I drew the asterisk triangle wrong. I redid the asterisk drawing. but i'm going to close this question and re-post it since this one's not gaining much activity.