T
T
Tarasov Konstantin2014-02-23 19:05:25
Java
Tarasov Konstantin, 2014-02-23 19:05:25

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

2 answer(s)
F
FoxInSox, 2014-02-23
@saroff

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.

O
Orekhov Alexey, 2014-02-23
@PokimonFromGamedev

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 question

Ask a Question

731 491 924 answers to any question