StringBuilder

StringBuilder is very similar to StringBuffer except for one important difference which is not synchronized. It means StringBuilder is not thread safe as methods inside StringBuilder class are not synchronised. StringBuilder is also mutable like StringBuffer. Mutable string means we can modify the string as many times as we want without creating a new string […]

Share this article on

String constant pool

It is also called as String literal pool or String pool. As the name suggests, String constant pool is a pool of strings stored in a separate place within the Heap area. We all know that we can create strings using “new” or by directly defining value in double quotes. Whenever we create a string […]

Share this article on
< Previous Next >