G
Gil
Does anyone know what the maximum length of a Java String can be?
Gil said:Does anyone know what the maximum length of a Java String can be?
Gil said:Does anyone know what the maximum length of a Java String can be?
Gil said:Does anyone know what the maximum length of a Java String can be?
Does anyone know what the maximum length of a Java String can be?
With 2 bytes per unicode character that is 4 GB of course (not 2 GB).In theory: 2^31 - 1 = 2147483647 (~2 GigaByte).
In practice: end of virtual memory.
Paul.
Fahd Shariff said:1 char = 2 bytes not 4 bytes since Java uses 16 bit unicode.
The size of the available Heap memory?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.