Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8215131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:41:04+00:00 2026-06-07T11:41:04+00:00

I am using jdk 1.6. This is my code. float f = 10.0f; double

  • 0

I am using jdk 1.6. This is my code.

float f = 10.0f;

double d = 10.0; 

System.out.println("Equal Status : " + (f == d)); 

then the system shows the answer as true. But if I modified the value as

float f = 10.1f; 

double d = 10.1; 

System.out.println("Equal Status : " + (f == d));

then the system shows the answer as false. I know the system use Bit matching for == checking. But what is the reason behind. Can you explain about it? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:41:05+00:00Added an answer on June 7, 2026 at 11:41 am

    While this is not “my” answer, this is about as close to “must read” literature for programmers who want to move from “meh” to “good.” Great is something truly special, so don’t think that “good” is anything to sneeze at. 🙂

    What Every Programmer Needs to know about Floating Point

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Guava-05-snapshot, with Sun's JDK 1.6 The code blows up executing this snippet:
This is using the Backberry JDK (5.0 if needed). I have a custom Manager
I'm using intelliJ IDEA version 9.0.1 build #IU 93.94 with JDK 1.6.0_17. This error
I had a gui (swing) project developed using netbeans 7 and JDK 6. Then
I've tried to run a Wicket app in an embedded Jetty, using this code:
I am using this code to compile a Java file at runtime. First of
Error appears in android project using ormlite I get compilation error on this code:
Here's a question, this first code listing compiles just fine (JDK 1.6 | JDK
I am using jdk 1.6 My main method : exmp3<String , Integer> exmp3 =
I am using JDK 7 and Netbeans IDE 7.1.2. Going through Using string in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.