S
Sebastian Stelzer
Hi!
I have a question.
How can I add an Integer to another Integer?
I ask, because the Java compiler printed an error message to the screen,
while I was compiling my source file:
<output>
calcit2004.java:77: operator + cannot be applied to
java.lang.Integer,java.lang.Integer
iTmp3 = String.valueOf(iTmp1 + iTmp2);
^
</output>
Here is the line 77:
<code>
String iTmp3 = new String();
Integer iTmp1 = new Integer(zahl1);
Integer iTmp2 = new Integer(zahl2);
iTmp3 = String.valueOf(iTmp1 + iTmp2);
</code>
I have a question.
How can I add an Integer to another Integer?
I ask, because the Java compiler printed an error message to the screen,
while I was compiling my source file:
<output>
calcit2004.java:77: operator + cannot be applied to
java.lang.Integer,java.lang.Integer
iTmp3 = String.valueOf(iTmp1 + iTmp2);
^
</output>
Here is the line 77:
<code>
String iTmp3 = new String();
Integer iTmp1 = new Integer(zahl1);
Integer iTmp2 = new Integer(zahl2);
iTmp3 = String.valueOf(iTmp1 + iTmp2);
</code>