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

  • Home
  • SEARCH
  • 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 6087031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:49:25+00:00 2026-05-23T11:49:25+00:00

I need your help with a small problem. It there a possibility (in Java

  • 0

I need your help with a small problem.

It there a possibility (in Java or an abstract solution) to transform a arbitrary String into an Integer with the property, that the alphabetically ordering does also work with the Integer?

Example:
House < Tree < Zoo in alphabetically order.

I would like to transform those Strings into Integer, so that the ordering is also available. Important is, that the concrete Strings are not known before. That means it should be a unique transformation.

I hope someone can help me.

Regards,
Michael

  • 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-05-23T11:49:26+00:00Added an answer on May 23, 2026 at 11:49 am

    No, it’s not possible. Let’s say you have two strings which represent 1 and 2. You can always make another string which would fit between them alphabetically e.g.

    aa  = 1
    ab  = 2
    aaa = ???
    

    If you know the strings you’re dealing with have a maximum length, then this is possible. For example, suppose your string has length <= 3. Take a string abc, and convert each letter to a number, where A = 1, B = 2, …, Z = 26. If the string is less than 3 characters long, fill in the blanks at the end with zeroes. Then the value is:

    (a * 27 * 27) + (b * 27) + c
    

    Then:

    aa  = 756
    ab  = 783
    aaa = 757
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ive being trying to cope with this problem but still. I need your help.
I am working on a small project and need your help. Here are the
I think my problem is very small, but i still need for help in
I need your help, cause I'm thinking about how to resolve this problem and
I need your help, For example I have a decimal type variable and I
I need your help to define a special case in XML schema: A sequence
I really need your help in my issue very quickly and it's too close
I really need your help for this. I am relatively new to programming and
I'm completely stuck and need your help... I've created a webservice stub with jaxb
Dear friends, I need your help. I need to send .bmp file to another

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.