How to make java not get stuck while performing String operation

Printable View