In Javascript I would do it like that:
const _data = new Uint8Array([0, 1, 2, 4, 5, 6, 7, 8, 9, 77, 100]);
const s = '[' + _data.join(',') + ']';
console.log(s);
> [0,1,2,4,5,6,7,8,9,77,100]
Added the solution from SomeDude:
byte[] b = new byte[]{1,2,3,4,5,77};
s = Arrays.toString(b);
System.out.println(s);
> [1, 2, 3, 4, 5, 77]