Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between poll memory and non-poll memory?

 
manas ranjan mandal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between poll memory and nonpoll memory?and what is the difference between String s="abc"; and String s=new String("abc");
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean 'pool' memory, as in the String pool ?
 
Praveen Kumar
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In java , When ever you creates string litelars , they will be created in String pool ( pool memory).

s="abc"; creates one object in pool memory
and String s=new String("abc"); creates two objects. I hope one in pool and other one in non pool .

Pls correct me if am wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic