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
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Beginning Java
(int)
shree vijay
Ranch Hand
Posts: 208
posted 21 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 21 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 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks...
Regards,<BR>Shree
Apu Nahasapeemapetilon
Ranch Hand
Posts: 51
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
fyi,
use modulus iffin you want to round...
Good night. Drive safely. Here's a tiny ad for the road:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
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...