Answer the question
In order to leave comments, you need to log in
How do strings work in Java?
Nowhere did I find a sensible explanation of the internal organization of strings in Java. In most other languages, a string is an array of characters. What are java strings?
Answer the question
In order to leave comments, you need to log in
Have you just tried to look at the source of the String class? As in other languages, String is a wrapper around an array of characters.
Java Strings are a String class. This is an immutable object. (in other words, every change creates a new object). The internal structure of this object should not excite you. It is hidden.
To work with strings at a low level, use C/C++
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question