Masking a String with only last 2 digits displayed
Hi,
I will get a list of account numbers from the DB which I need to mask it with "$" except the last 2 characters. It will be numeric
and the size is 15 in DB. Like for example , i may get the account numbers which are of 10 character width as well as 15 character width but still i need to parse
the account number and display only the last 2 numbers in it with other numbers masked with "$".
Like $$$$$$$$$$$$$54 for 15 digit account number. The above needs to be done with in a loop as there a list of account numbers which
will be retreived from the DB. Which is the best possible way to do this?
Thanks,
CrazyJavaLover