I want to create string with 100000 characters long.
String ab=new String("SHBSATO6MC1UN8W3W3..........");
Above line is giving me a compilation error in terminal(can't see the error). IDE giving me a compilation error
Error:(15, 22) java: constant string too long
What is the reason. IFAIK, we can use 2^31-1 characters for String