menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Why String...
source image

Medium

1w

read

410

img
dot

Why String in Java Doesn’t Always Need new – Behind the Scenes of String Memory Management

  • String in Java doesn’t always need new
  • String interning and the string constant pool are powerful memory-saving features in Java
  • Java reuses the same string literal from the string constant pool
  • Using the intern() method checks the string pool and returns the pooled object or adds it to the pool

Read Full Article

like

24 Likes

For uninterrupted reading, download the app