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
Eclipse Collections Categorically: Level up your programming game
this week in the
Open Source Projects
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
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Programmer Certification (OCPJP)
Double literal
Ganesha Kumar
Ranch Hand
Posts: 56
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Why is the floating point literal such as 3.21 always of the type double by default.
wise owen
Ranch Hand
Posts: 2023
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Java
Language Specification.
3.10.2 Floating-Point Literals
[ May 15, 2006: Message edited by: wise owen ]
Ganesha Kumar
Ranch Hand
Posts: 56
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The article just describes float and double literals. But it does not say why a literal such as "3.02" is double by default. What is the advantage of having it double.
wise owen
Ranch Hand
Posts: 2023
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
more precision.
IEEE floating-point standard
.
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Operators and Assignment
Return type of MyClass.class
Ready for garbage collection
double excepts hexadeci.?
Regex Question
More...