Simple way to repeat a string August 19, 2021 by James Palmer Here is the shortest version (Java 1.5+ required): repeated = new String(new char[n]).replace(“