How many characters can a Java String have? -
I am trying to get a problem with the Sphere Online Judge (SPOJ) where I have an integer number of digits Thought to use the functions of Java, but would they allow this string to last longer?
You should be able to get the length of the string (always 2147483647 (2 31 - 1) By the Java specification, the maximum size of an array, which is used by the string class for internal storage) or half your maximum heap size (because each letter is two bytes), which is also small.
Comments
Post a Comment