There is a 100,000-character text that need to be displayed. If I put it into String object, I get an error “constant string too long”. The same is with StringBuffer object.
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("Long text here........"); //<-- error
Is there a solution to this beside cutting the text into smaller texts?
I think the length of constant strings in java is limited to 64K — however, you could construct a string at run time that is bigger than 64K.