on 10-17-2005 6:02 PM
Hello,
I'm using StringBuffer for concatenating strings. For example:
public String statement() {
final int n = 3;
final StringBuffer s = new StringBuffer(n * 4);
for (int i = 0; i < n; i++) {
s.append("ddd ");
}
return s.toString();
}
.. but this code arise java.lang.NoSuchMethodError: java.lang.StringBuffer.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder;
Why? I can use concatenating string operator +, but this decrease performance.
Best regards,
Josef Motl
Seems like you had compiled your code using one Java version (probably 1.4) and deployed to lower one (like 1.3)
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.