File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please provide the explanation regarding string objects............

 
pvsr rao
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public String makinStrings() {
String s = �Fred�;
s = s + �47�;
s = s.substring(2, 5);
s = s.toUpperCase();
return s.toString();
}
How many String objects will be created when this method is invoked?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This very question seems to become popular; please see the previous discussions.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://weblogs.java.net/blog/paranoiabla/archive/2007/02/a_few_questions.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic