in reply to Re: Memory Use/Garbage Collection: Java vs Perl
in thread Memory Use/Garbage Collection: Java vs Perl
to the compiler (the last toString() because a PrintStream doesn't have a println() method that takes a StringBuffer). I was taught even in my first CS class (we learned Java) that strings worked the way you said, and I was under that assumption until about five minutes ago. Perhaps I am wrong, but in my reading of the docs it appears that Java handles string concatentation with the + operator as you suggested he try manually.System.out.println(((new StringBuffer("I am'")).append(me.toString())) +.toString());
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Memory Use/Garbage Collection: Java vs Perl
by BrowserUk (Patriarch) on Sep 03, 2002 at 13:35 UTC | |
by John M. Dlugosz (Monsignor) on Sep 03, 2002 at 14:53 UTC | |
by BrowserUk (Patriarch) on Sep 03, 2002 at 15:09 UTC | |
by John M. Dlugosz (Monsignor) on Sep 03, 2002 at 15:25 UTC | |
by jsprat (Curate) on Sep 03, 2002 at 20:55 UTC | |
| |
by hossman (Prior) on Sep 04, 2002 at 00:37 UTC |