Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
I have a problem
jeyakanth yogaratnam
Greenhorn
Posts: 9
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
this code compiles and runs perfectively in
java
5 , but in jdk 1.4 it gives me a compilation error. Can anyone tell me wht is the problem with this code. plz explain it to me.
class Testing { public static void main(String args[]) { Double a = new Double(12); Double b = new Double(a);//compile error in jdk 1.4 System.out.print(a.equals(b)); } }
regards
jeyakanth
Keith Lynn
Ranch Hand
Posts: 2412
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In 1.5, a Double can be autounboxed into a double.
There is not a constructor in Double.java that accepts a Double, but there is one that accepts a double.
I wasn't selected to go to mars. This tiny ad got in ahead of me:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Appending to file | Error
Are Wrapper values Immutable ?
"Double" and "double" - what's the difference?
About KeyEvent
Overloading
More...