How to resolve java.lang.OutOfMemoryError error by "java.lang.String ...

How to resolve java.lang.OutOfMemoryError error by "java.lang.String ...