Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
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
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Beginning Java
(int)
shree vijay
Ranch Hand
Posts: 208
posted 24 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What is the value returned for
(int)(5.99)
Regards,<BR>Shree
Noah Carroll
Ranch Hand
Posts: 96
posted 24 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The value returned would be 5. When you cast from double or float to int it simply drops the decimal value. It does not round. I hope it helps.
shree vijay
Ranch Hand
Posts: 208
posted 24 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks...
Regards,<BR>Shree
Apu Nahasapeemapetilon
Ranch Hand
Posts: 51
posted 24 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
fyi,
use modulus iffin you want to round...
Are we home yet? Wait, did we forget the 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
Generating thumbnail on unix
can anyone please check my method
What is the difference between these statements
integer literals
getting values from JTable and putting them into textfields
More...