This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: println-Bug in Java


Per Bothner wrote:

Bojan Antonovic wrote:

So println with a char and a number (int or double) works wrong!


No. Read the specification of '+' in the Java Language Specification.

I read it.


Why ist his bug not fixed?


Because it's not a bug.

System.out.println('a'+'b') gives 195. + for Strings means concatenation. + for chars should return Strings, and not interpreting them as numbers and adding them. So for me this is a bug in the Java Language Specification, because it leads to misbehaviour.


For me, this thing is cleared, and I don't want to polute java@gcc.gnu.org with discussions about facts they can't change! :)

Bojan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]