SyntaxFix
Write A Post
Hire A Developer
Questions
The second one causes a new char array to be created, and all chars from the String to be copied to this new char array, so I would guess that the first one is faster (and less memory-hungry).