Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958763

Pages: 1
xen
stranger


Reged: 09/09/07
Posts: 1
String concatenation in 1.6
      #53294 - 09/09/07 08:56 PM

I do not know whether this is a new aspect of 1.5 or 1.6, but I've noticed that when I concatenate two strings using Code:
String s = "abc" + i + "def";

(where i is an integer < 10) the resulting String has array size 7. Also, Code:
new StringBuffer("abc").toString()

will give me a String size 3. So there's no need to use .concat anymore.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4511

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5