There is no such operator in Java, but you can use Arrays.fill () or Apache Commons StringUtils.repeat () to achieve this result:
Assuming
char src = 'x'; String out;
with Arrays.fill ()
char[] arr = new char[10] ; Arrays.fill(arr,src); out = new String(arr);
with StringUtils.repeat ()
out = StringUtils.repeat(src, 10);
source share