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
Help coderanch get a
new server
by contributing to the
fundraiser
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
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Beginning Java
(int)
shree vijay
Ranch Hand
Posts: 208
posted 23 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 23 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 23 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks...
Regards,<BR>Shree
Apu Nahasapeemapetilon
Ranch Hand
Posts: 51
posted 23 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
fyi,
use modulus iffin you want to round...
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...