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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:42:46+00:00 2026-06-09T13:42:46+00:00

This is a question from a past paper, i’m not really sure what to

  • 0

enter image description here

This is a question from a past paper, i’m not really sure what to do. i have done this so far, any help is appreciated. My code may be confusing as i try to comment what i need to do then try to do it

public class NumberConvert {

public NumberConvert(int from, int to) {

}

public String convert(String input) {

    if(input==null){
        return "";
    }else{
        return "FF";//Not sure what to do here
    }

}

public static Integer valueOf(String s, int radix)
        throws NumberFormatException {

    try {//if radix is out of range (not sure what the range is)
    }catch(NumberFormatException e){
        System.out.println(e.getMessage());
    }
    return 0;// to complete

}

public static String toString(int i, int radix) {

    return "";//need to complete

}

public static void main (String[] args){

}
}
  • 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-09T13:42:48+00:00Added an answer on June 9, 2026 at 1:42 pm

    The Integer class provides a version of parseInt() that allows you to specify the radix, and similarly the toString() method also allows you to specify the radix.

    The whole conversion can be done in one line:

    return Integer.toString(Integer.parseInt(input, from), to));
    

    The other two methods just use parts of this one line, or you may call your methods as thin wrappers around the Integer methods.

    You’ll need to create instance fields to store from and to and set these in your constructor.

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

Sidebar

Related Questions

This question is for revision purposes from a past exam paper I just want
This question is from a past exam paper and it is used for revision
Unfortunately I am not writing this question from my Developing PC so I might
I know this question will sound like a from the past thing but I
I know this question was already asked in the past, but i am really
I realize that this question may have been asked several times in the past,
While I have made a topic like this in the past, this is from
Example question from a past operating system final, how do I calculate this kind
Halo I'm sure this question has been asked many times in the past, but
I know this question has been asked in the past, but times have changed

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.