📜  java代码示例中的重复字符串

📅  最后修改于: 2022-03-11 14:52:28.214000             🧑  作者: Mango

代码示例1
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);
    }
}