
"UNECM - Decoder for Error Code Modeler format v1. ** - Assumes a 32-bit or higher integer size ** along with this program if not, write to the Free Software ** You should have received a copy of the GNU General Public License ** GNU General Public License for more details. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ** but WITHOUT ANY WARRANTY without even the implied warranty of ** This program is distributed in the hope that it will be useful,

** of the License, or (at your option) any later version. ** as published by the Free Software Foundation either version 2 ** modify it under the terms of the GNU General Public License ** This program is free software you can redistribute it and/or ** UNECM - Decoder for ECM (Error Code Modeler) format. String strI = "" + javac TestClass.java & javap -c TestClass To answer Grodriguez's comment: ** No, the compiler doesn't optimise out the empty string in this case - look: cat TestClass.java

It's slightly less efficient ( sb.append() ends up calling Integer.getChars(), which is what Integer.toString() would've done anyway), but it works.

Java has special support for the + operator when used with strings (see the documentation) which translates the code you posted into: StringBuilder sb = new StringBuilder() Īt compile-time. The concatenation will work, but it is unconventional and could be a bad smell as it suggests the author doesn't know about the two methods above (what else might they not know?). Numerous conversion and formatting options. Excellent educational tool for C++ developers learning Java. Fast - tens of thousands of lines converted from C++ to Java per minute. Normal ways would be Integer.toString(i) or String.valueOf(i). Flexible - converts snippets, files, and folders from C++ to Java. Use this String.valueOf(value) How do I convert from int to String?
