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 813721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:24:23+00:00 2026-05-15T01:24:23+00:00

I had an annoying issue, getting a Possible loss of precision error when compiling

  • 0

I had an annoying issue, getting a “Possible loss of precision” error when compiling my Java program on BlueJ (But from what I read this isn’t connected to a specific IDE).

I was surprised by the fact that the compiler told me there is a possible loss of precision and wouldn’t let me compile/run the program. Why is this an error and not a warning saying you might lose precision here, if you don’t want that change your code?

The program runs just fine when I drop the float values; it wouldn’t matter since there is no point (e.g [143.08, 475.015]) on my screen.

On the other hand when I loop through an ArrayList and in this loop I have an if clause removing elements from the ArrayList it runs fine, just throws an error and doesn’t display the ArrayList [used for drawing circles] for a fraction of a second. This appears to me as a severe error but doesn’t cause (hardly) any troubles, while I wouldn’t want to have such a thing in my code at all.

What’s the boundary?

  • 1 1 Answer
  • 1 View
  • 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-05-15T01:24:23+00:00Added an answer on May 15, 2026 at 1:24 am

    It’s an error because the spec doesn’t allow narrowing primitive conversions in an Assignment Conversion.

    If you really want to assign a larger datatype to a smaller one, such as double to float, you must explicitly cast it.

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

Sidebar

Related Questions

So, I've been programming in python and I've run into this really annoying issue.
I have a Windows project that also works on XCode. But I had to
I'm running into kindof an annoying problem and would need some advice... Let's say
This is a annoying problem and I have no idea what is causing it.
Just wondering if anybody had the same problem with rubygems.org I appluad the decision
It happens quite frequently, more times per day, that with Visual Studio 2010 ,
Here's the site in question: http://cbcsettlementfunding.com/dev/ Almost finished up with development, just have a
I'm trying to rotate a drawable inside a view by touching it and moving
I have my website in /var/www/invent. I have zend-framework in /var/www/invent/library. Basically what i
I have a UserControl containing interactive elements within a grid. The user can move

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.