![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 223
Rep Power: 4
![]() |
The immutability of strings
Quick question...
Just having read through stuff recently and trying to be a little more concious of efficiency in my programs I wasn't sure about this. I know that having the following String test = "James"; test += " is testing this"; Actually creates two strings, and it's better to use stringbuilder class to do this type of thing. However, does this String test = "James" + " is testing this"; Create one or two strings? I would assume one, but you know what they say about assuming! |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Splitting strings into other strings | Keiro | C | 2 | Dec 11th, 2006 6:10 AM |
| inserting strings into other strings | codylee270 | C | 2 | Dec 3rd, 2005 9:37 PM |
| Question about multidimensional arrays of strings | aznluvsmc | C | 8 | Oct 15th, 2005 10:20 PM |
| creating Strings | pleasehelpmeeee | Java | 5 | Sep 26th, 2005 8:03 PM |
| pointers strings, and strcat() | conbrio | C | 3 | Apr 16th, 2005 1:23 PM |