Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2011
    Posts
    24
    Rep Power
    0

    Default regarding int and float

    hello,

    If a number after decimal point is zero becomes integer or float? For example, I have a number 13444.0 Does this number is integer or float?

    thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,423
    Rep Power
    25

    Default

    Are you asking what data type the compiler will give to a number like this: 13444.0
    It will make it a double. Add an ending f to make it a float: 13444.0f
    To make it an int leave off the .0 13444

  3. #3
    Join Date
    Jun 2011
    Posts
    24
    Rep Power
    0

Similar Threads

  1. i want to float the answer
    By vibaviattigala in forum New To Java
    Replies: 2
    Last Post: 07-16-2011, 04:02 PM
  2. string to float
    By Sungron in forum New To Java
    Replies: 3
    Last Post: 02-02-2010, 09:23 AM
  3. Working with float
    By dardar in forum New To Java
    Replies: 8
    Last Post: 01-27-2010, 08:29 PM
  4. Float vs. Double
    By javanub in forum New To Java
    Replies: 1
    Last Post: 11-23-2008, 12:11 PM
  5. Class float
    By Peter in forum New To Java
    Replies: 1
    Last Post: 07-08-2007, 01:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •