Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to repeat string in java

public class Main 
{
  public static void main(String[] args) 
  {
    String str = "Abc";
 
    String repeated = new String(new char[3]).replace("", str);
 
    System.out.println(repeated);
  }
}
Source by howtodoinjava.com #
 
PREVIOUS NEXT
Tagged: #repeat #string #java
ADD COMMENT
Topic
Name
2+8 =