Tagged: string memory

How much memory does a string consume in Java 0

How much memory does a string consume in Java

Understanding String memory usage To understand the above calculation, we need to start by looking at the fields on a String object. A String contains the following: a char array— thus a separate object—...