java string умножительна
new String(new char[generation]).replace("\0", "-")
Brainy Baboon
new String(new char[generation]).replace("\0", "-")