if I want to repeat "hello" four times as a new string-> "hellohellohellohello". I can:
return new String(new char[4]).replace("\0", "hello")
时间: 2024-12-29 09:28:41
if I want to repeat "hello" four times as a new string-> "hellohellohellohello". I can:
return new String(new char[4]).replace("\0", "hello")