Content Warning

This website contains age-restricted materials including nudity and explicit depictions of sexual activity.

By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.

Lemmy NSFW
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
alphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 2 years ago

Java

lemmy.world

message-square
77
link
fedilink
535

Java

lemmy.world

alphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 2 years ago
message-square
77
link
fedilink
  • Acetamide@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    2 years ago

    AFAIK most typed languages have this behaviour.

    • Lmaydev@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      Because ints are way smaller. Over a certain value it would always fail.

      • larvyde@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Yea but at those values floating points can’t represent fractions anyway

        • Lmaydev@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Exactly. So if cast to int you’d either get an error or 0 for everything above a certain value.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 256 users / day
  • 4.09K users / week
  • 7.76K users / month
  • 17.1K users / 6 months
  • 79 local subscribers
  • 23.3K subscribers
  • 1.38K Posts
  • 46.4K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • UI: 0.19.11-nsfw
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org