DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 6 of 6

Thread: what is a float or long

  1. Junior Droid
    akasoldats's Avatar
    Member #
    4927
    Join Date
    Nov 2009
    Posts
    17
    Phone
    Droid
    #1

    what is a float or long

    I've started reading a book about android development. In one of the exercises it asks the reader to declare either a float, long, string, integer, or a boolean. I know what the last three would be used for but dont exactly understand what the first two are. Could someone give me a definition on what they would be used for?

    Is it on your Droid?
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. RS/Moderator
    Abe21599's Avatar
    Member #
    18400
    Join Date
    Dec 2009
    Location
    Pennsylvania
    Posts
    6,300
    Liked
    52 times
    Phone
    Galaxy SIII
    Premium Member
  4. Droid
    superkeest's Avatar
    Member #
    29611
    Join Date
    Jan 2010
    Posts
    67
    Phone
    Droid 3
    #3
    here you go this should be helpful:
    Let me google that for you
    Let me google that for you
  5. Junior Droid
    patelhimesh's Avatar
    Member #
    122619
    Join Date
    Sep 2010
    Posts
    12
    Phone
    motorola Droid 2
    #4
    Float used for decimal
    Long used for large integer
  6. Junior Droid
    akasoldats's Avatar
    Member #
    4927
    Join Date
    Nov 2009
    Posts
    17
    Phone
    Droid
    #5
    Lol sorry about the noob question, but thanks. Haha so thats what it feels like to be on the receiving end of LMGTFY.... not nearly as fun sending it.

    Is it on your Droid?
  7. Master Droid
    HarvesterX™'s Avatar
    Member #
    67996
    Join Date
    May 2010
    Location
    Virginia, USA
    Posts
    464
    Liked
    5 times
    Phone
    Motorola Droid -> Galaxy Nexus
    #6
    When using decimals you are better off using double instead of float, especially if many calculations are going to be made and precision is of importance. Also I do believe that most processors are optimized to handle doubles with greater efficiency.

    An integer is always going to be the size of the processor's register...so 32bit cpus will have 32bit integers and so on.

Ads

Posting Permissions

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

Similar Threads

  1. long time lurker, long time poster...
    By guidot in forum New Member Introductions & Site Assistance
    Replies: 2
    Last Post: 09-17-2010, 11:05 AM
  2. How Long...
    By Samurai26 in forum Android General Discussions
    Replies: 3
    Last Post: 06-23-2010, 01:04 PM
  3. Looking for lat. & long.
    By Steve H in forum Android Applications
    Replies: 6
    Last Post: 04-26-2010, 08:17 PM
  4. So long, AT&T!
    By Yno in forum New Member Introductions & Site Assistance
    Replies: 3
    Last Post: 01-13-2010, 07:48 AM

Search tags for this page

akasoldats

,

android declare float

,

droid calender with float

,

what is a float android

Click on a term to search our site for related topics.
Find us on Google+