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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:11:41+00:00 2026-06-18T09:11:41+00:00

Possible Duplicate: 09 is not recognized where as 9 is recognized Just wondering, when

  • 0

Possible Duplicate:
09 is not recognized where as 9 is recognized

Just wondering, when I declare the following:

public static final long __VERSIONCODE = 0L;
public static final long __VERSIONCODE = 9L;

that will work, but whenever I try this:

public static final long __VERSIONCODE = 09L;
public static final long __VERSIONCODE = 08235L;

I get an error (in eclipse):

“The literal 09L of type long is out of range.”

So I thought that was because it started with a zero.

but then I tried with the second digit lower as eight:

public static final long __VERSIONCODE = 07235L;

which gives me NO error.

then:

public static final long __VERSIONCODE = 07239L;

gives me also an error too.

So I really don’t get the point of which values I can assign to a long and which I can’t. Why do I get this errors? (It’s actually just that I’m curious, I can also just use a String for my version code).

Also, I forgot to mention that this behaves exactly the same using doubles instead of longs.

  • 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-18T09:11:42+00:00Added an answer on June 18, 2026 at 9:11 am

    When you put a 0 in front of an integer-type literal, it will interpret it as representing an octal number. Since “9” isn’t a valid digit for octal numbers, that might be what’s going on. Try printing out the (decimal) value of “010L” and see whether is says “8” to confirm.

    Note: not sure if Java does this, or if this is purely an artifact of Eclipse. If the latter, printing out 010L would show 10. If the former, you’d see 8. If it’s just an artifact of Eclipse, you can confirm by trying 01L, 02L, …, 07L, which should all work, and 08L and 09L which would fail.

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

Sidebar

Related Questions

Possible Duplicate: Why not use tables for layout in HTML? Just wondering, I thought
Possible Duplicate: SmartGWT Dialog title not set correctly I have a problem, is that
Possible Duplicate: Could not allocate memory My following code runs fine: double weight [600]
Possible Duplicate: PopupWindow not triggering sytem context dialog on EditText long-press Before I ask
Possible Duplicate: Why not use tables for layout in HTML? i know that using
Possible Duplicate: Program not waiting for cin I wrote the following code: #include <iostream>
Possible Duplicate: InfoWindow not Displaying Still lingering on a problem that I do not
Possible Duplicate: window.requestFileSystem not working Following is the code to generate a csv file
Possible Duplicate: Not possible to launch a file on a network using Java Desktop?
Possible Duplicate: Activity not started, its current task has been brought to the front

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.