java string repeat character code example
Example 1: repeat string in java
public class Main
{
public static void main(String[] args)
{
String str = "Abc";
String repeated = new String(new char[3]).replace("\0", str);
System.out.println(repeated);
}
}
Example 2: multiple string java
String string = string.repeat(repeatTime);