In Java, a String is a sequence of characters that represents text. It is an immutable class, meaning that once a String object is created, its value cannot be changed.
Convert to/from String may have some cost, bettern solution is tackle inner data structure of StringBuilder/StringBuffer directly. But StringBuilder/StringBuffer ...
Cuireadh roinnt torthaí i bhfolach toisc go bhféadfadh siad a bheith dorochtana duit
Taispeáin torthaí dorochtana