A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
String Buffer & String
Joined: Dec 07, 2001
Aug 27, 2004 02:59:00
I could remember there was some write up by Cindy on the above two.. could not able to locate on the site. Can somebody help me?
Joined: Dec 10, 2001
Aug 27, 2004 03:52:00
Perhaps you'd have some luck using Cindy's member number as one of the search parameters. It's 3498.
How To Ask Good Questions
JavaRanch FAQ Wiki
Joined: May 03, 2004
Aug 27, 2004 06:06:00
Object type Comparision
-->> immutable (Value once assigned cannot be modified)
-->> mutable (Value can be modified).
is better when u compare String with
in string manipulation that is
String str = "Hello";
str = str+"World" ;
sbstr = new
if we look at the above example the major and hidden difference is internally how JVM handles the string manipulation....
when we say str = str+"World";
xxx = new
str = xxx.toString();
Now u can make out that internally there is a overhead of converting the String str to
and applying append method on that and finally it is assigned backto the str the modifed str....
Joined: Aug 02, 2004
Aug 27, 2004 12:27:00
More details here...
Co-Author of <a href="http://www.oreilly.com/catalog/jswing2" target="_blank" rel="nofollow">Java Swing</a><br />Co-Creator of <a href="http://www.sun.com/training/catalog/courses/CX-310-055.xml" target="_blank" rel="nofollow">SCJP 5.0</a> and <a href="http://www.sun.com/training/certification/java/associate_beta.xml" target="_blank" rel="nofollow">SCJA</a> exams
I agree. Here's the link:
subject: String Buffer & String
Question 9, Chapter 6 in K&B
Problems making an unique ID for every word
Extract an Email From a String literal
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014