Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8131605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:08:15+00:00 2026-06-06T09:08:15+00:00

java docs says: A pool of strings, initially empty, is maintained privately by the

  • 0

java docs says:

A pool of strings, initially empty, is maintained privately by the
class String.

1) Is it a pool of string literals or references to these string literals? on net some articles refer it as pool of strings literals while other refer it as pool of references so i got confused.

2) Is string pool created per class basis or per JVM basis?

3)Is there any reference where i can find details of string pool, its implementation etc.?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:08:17+00:00Added an answer on June 6, 2026 at 9:08 am

    1) Is it a pool of string literals or references to these string literals? on net some articles refer it as pool of strings literals while other refer it as pool of references so i got confused.

    It is the same thing. You can’t have a String object without a reference, or vice-versa.

    And, as Peter Lawrey puts it: “In Java, an Object is inside the heap. Nowhere else. The only thing you can have inside something else, an object, an array, a collection or the stack, is a reference to that object.”

    2) Is string pool created per class basis or per JVM basis?

    There is one String pool per JVM … unless you are using some exotic JVM where they’ve decided to implement it differently. (The spec doesn’t say that there has to be one string pool for the JVM, but that’s generally the most effective way to do it.)

    3)Is there any reference where i can find details of string pool, its implementation etc.?

    You can download the complete source code of OpenJDK 6 or 7. The spring pool is implemented in native code … so you’ll be reading C++.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis() says: Returns the current time in milliseconds. Note that while the unit of
I was reading the JavaDoc for Threadlocal here https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ThreadLocal.html and it says ThreadLocal instances
The Java Docs for the method String[] java.io.File.list(FilenameFilter filter) includes this in the returns
Java Docs says that, putIfAbsent is equivalent to if (!map.containsKey(key)) return map.put(key, value); else
I was reading the Java api docs on Hashtable class and came across several
Java docs says the following about Set interface, can someone please help me understand
From http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#99740 example A3.3 says, it says that an object might still not be
I saw this in the java docs: ScheduledAtFixedRate , it says If any execution
Java docs says that a TreeSet keeps its elements ordered internally. Here what does
The java docs says Methods to access the character-based console device, if any, associated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.