Timeline for Returning a string representation of the number of albums and songs available
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 15, 2015 at 16:51 | comment | added | user22048 | There is a StringBuilder there - it's implicit. If you look at the byte code generated, you'll see the creation and destruction of StringBuilders. I would also point out that this code appears to create three StringBuilders (once for each simplePlural invocation, one for the overall), and two additional Strings (which are then left to collection). Consider the object creation / collection when running simplePlural hundreds or thousands of times. | |
Jun 15, 2015 at 13:44 | comment | added | Vogel612 |
and now localize it ;) Your code does not account for a different plural form than s
|
|
Jun 15, 2015 at 13:31 | history | answered | rolfl | CC BY-SA 3.0 |