Hiiii,
your problem can be sorted out if you use following code as the last loop..
and few points i want you to note..
1. The following code will print one extra asterics than required
2. Your are using a lot of String mnipulation in loops.. which is not a good idea.. as it will create a lot of Strings in memory.
you should use StringBuffer class instead. Eg: -
this is a more efficient way of doing String manipulation..
I think i am clear enough. If stil any queries please revert back..
Thanks
Amit