Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Spring Boot in Practice
this week in the
Spring
forum!
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
Tim Cooke
Ron McLeod
Jeanne Boyarsky
Paul Clapham
Sheriffs:
Liutauras Vilda
Henry Wong
Devaka Cooray
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Al Hobbs
Carey Brown
Bartenders:
Piet Souris
Mikalai Zaikin
Himai Minh
Forum:
Programmer Certification (OCPJP)
Wrapper classes??
srikanth reddy
Ranch Hand
Posts: 252
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Q 29. What is the output { Float f1 = new Float("4.4e99f"); Float f2 = new Float("-4.4e99f"); Double d1 = new Double("4.4e99"); System.out.println(f1); System.out.println(f2); System.out.println(d1); } a) Runtime error b) Infinity -Infinity 4.4E99 c) Infinity -Infinity Infinity d) 4.4E99 -4.4E99 4.4E99
hi,
in the above question answer is given to be b...i wanted to know whether is it exceeding the range or what....and in case of double whats happening??do we need to remember the range or what??
thanks
srikanth
Thanks & Regards<br /> <br />-Srikanth
Seb Mathe
Ranch Hand
Posts: 225
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The answer is... Yes, you have to know primitive's ranges...
For sure, you'll have questions about it. (At least about integer types. )
[ September 29, 2005: Message edited by: Seb Mathe ]
Regards,<br />Seb<br /> <br />SCJP 1.4
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
java.lang.Number
Float
Doubt with Float class
Wrapper class
another question form Poddar's questions
More...