1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ohaa [14]
3 years ago
8

Write a recursive method, numToString, that takes two arguments: num, the number to convert, and base, the base to represent the

number in. For instance, calling numToString(10, 2) returns the decimal number 10 as the base-two (binary) string "1010". Your method should work with any base 2 <= base <= 36. g
Computers and Technology
1 answer:
AnnyKZ [126]3 years ago
6 0

Answer:

This is the required code:

Explanation:

public class NumberToString {

   public static String numToString(int num, int base) {

       final String digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";

       if (num < base) {

           return "" + digits.charAt(num);

       } else {

           return numToString(num / base, base) + digits.charAt(num % base);

       }

   }

}

You might be interested in
What finger is used to key letter c
kumpel [21]

Answer:

your pointer finger

sorry if this is wrong

Explanation:

8 0
3 years ago
Read 2 more answers
If your cousin wanted to view information from the world wide web, what application software would you tell her to be sure she h
MAVERICK [17]
Well, I would say a web browser, like Mozilla Firefox, Safari for IOS, Windows Edge, Chrome, or Internet Explorer; and some anti-malware software, since there are multiple websites on the WWW that try to steal your information and give your device viruses.
6 0
3 years ago
The following numbers are sorted in which way: 10, 20, 30, 40? A. ascending B. descending C. shuffled
Leya [2.2K]
The answer is ascending because ascending is the numbers from smallest to largets
5 0
4 years ago
Read 2 more answers
What command do we use to enter data from the keyboard?
SVEN [57.7K]
D I would think……… good luck
6 0
3 years ago
I have a project on "USING ADVANCED FORMULAS". It wants me to make a spreadsheet to track payroll. I have no clue how to do this
ANTONII [103]
Try to do it on Microsoft word 2013
7 0
3 years ago
Other questions:
  • What is an online alternative to customers sending checks via mail?
    7·1 answer
  • How to know if somebody else is listening my conversations by cellphone?
    13·1 answer
  • How can a System Administrator quickly determine which user profiles, page layouts, and record types include certain fields? Uni
    14·1 answer
  • Select the correct statement(s) regarding a Network Access Point (NAP), also known as an Internet Exchange Point (IXP). a. At a
    12·1 answer
  • To use   ( 2 complement ) answer it (101101)2 – (1100)2 =   (                    )2
    12·1 answer
  • PLZ HELP I DIDNT MEAN TO CLICK THAT ANSWR I NEEDD HELP
    15·1 answer
  • Im drinking coffee. and working on school and watching a show. Whos with me?
    9·1 answer
  • Five jobs arrive nearly simultaneously for processing and their estimated CPU cycles are, respectively: Job A = 2 ms, Job B = 12
    7·1 answer
  • A network administrator has asked robin, a network engineer, to use ospf (open shortest path first) along with rip (routing info
    11·1 answer
  • By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!