• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

What is Ceil, Floor, Float, Double

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please Explain me
What is ceil ,Floor, Float,Double,Long ,int.
Please Explain with Defination and example each one.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

long, int, and float are primitive types not sure what rest are..
here is a link:
http://java.sun.com/docs/books/tutorial/native1.1/integrating/types.html
------------------
 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Math.ceil() and Math.floor() are methods.
System.out.println(Math.floor(3.2) == 3); // prints 'true'
System.out.println(Math.ceil(3.2) == 4); // prints 'true'
Watch you capitalization. byte, short, int, long, float, and double are the primitives for representing numbers, while Byte, Short, Integer, Long, Float, and Double are objects for representing numbers.
I don't really want to give a detailed explination about the number primitives, but heres a quick overview:
byte, short, int, and long represent signed integers (42, 0, -3)
float and double represent signed decimal numbers (3.0, -2.4, 0.5)
byte holds numbers from -128 to 127
short: -32768 to 32767
int: -2147483648 to 2147483647
long: -9223372036854775808 to 9223372036854775807
The numbers that the floating point types (float and double) can hold are in a very different format, so it does not make sense to give ranges for them.
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic