repeat() java code example
Example: 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);
}
}