Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Beginner  RSS feed

 
Nadir Rehman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help me to find information related with intern() function?
------------------
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the search facility at top-right to search this forum.
------------------
Bosun
SCJP for the Java� 2 Platform
 
Khurram Hussain
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello there
intern() method is use to change string object from heap to pool.
String aa=new String("Hello"); //this is in heap
String bb="Hello"; //this is in a pool

if ur still confuse please mail me.My email address is y2khurram79@yahoo.com
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!