Implicit conversion between Double and double [message #731813] |
Mon, 03 October 2011 07:59 |
Sayan Mukherjee Messages: 2 Registered: October 2011 Location: Mumbai, India |
Junior Member |
|
|
I am getting different behaviour in two different Eclipse installations:
Env A -> JDK 7.0, JRE 7.0 and Eclipse Galileo
Env B -> JDK 1.6.0_03, JRE 1.6.0_03 and Eclipse Pulsar
The code:
Double d1 = new Double(1.234); /* Line 1 */
double d = 7.32; /* Line 2 */
Double d2 = d1 + d; /* Line 3 */
In Env A:
When I try to compile the above code, I get a Eclipse compile error in Line 3 saying the operator '+' cannot add 'Double' with 'double'. Eclipse shows a red marker under the '+' sign.
In Env B:
THE CODE WORKS!
I think it is NOT an issue with JSE/JDK version - it is possibly some config in Eclipse. Can somebody tell me what is this config so that code can compile in Eclipse Galileo?
Thanks in advance.
Sayan
[Updated on: Mon, 03 October 2011 08:00] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02850 seconds