Representing Fractional Numbers in Java – Learn Java #5

[ad_1]
Although the Java programming language gives us several different ways of representing fractional numbers: we must be aware these methods are not created equal. In this tutorial, we will explore the differences between the float data type and the double data type. We will discuss size, precision, syntax and usage cases.

——– Footnotes——–
We highly suggest you leave us any comments or feedback that would aid in bettering the production of these tutorials. Additionally, subscribing to us will help us to better engage you (the audience) such that we can improve our tutorials even further!

Please Consider Supporting This Channel via Subscribing:

Sign Up for Monthly (non-spam) updates:
Support Us:
Follow me on Twitter:

——– Suggested Reading ——–

Book: “Clean Code” – Robert C. Martin –

#programming #code #java


Posted

in

by

Tags:

Comments

4 responses to “Representing Fractional Numbers in Java – Learn Java #5”

  1. MrRiffRaph Avatar

    I have a suggestion for an improvement:

    I usually open up new java class files in Eclipse right next to videos as i'm just learning and want to follow along and copy notes to get used to typing in Java. However it's hard to see the text without making it full screen, but then of course I can't take notes during.
    Could you perhaps make the font size a little bigger?

  2. Cem Yesil Avatar

    If floating point data types shouldn't be used to represent monetary numbers, what should be used instead? Thanks for the great videos.

  3. Issac Gerges Avatar

    Nice. Agreed floats should be avoided for beginners, but the "f" for float literals is less ugly to the cast.

    float pie = 3.14f;

Leave a Reply

Your email address will not be published. Required fields are marked *