You are viewing a single comment's thread. Return to all comments →
Use Arrays.fill() to generate the number instead of running a loop to genereate the number.
We could do something like this as well
new String(new char[n]).replace('\0', '5');
This is to repeat character '5', number of times