Consider the following recursive method. public static string recur(int val) { string dig = "" + (val % 3); if (val / 3 > 0) return dig + recur(val / 3); return dig; } what is printed as a result of executing the following statement? system.out.println(recur(32));

Answers

Answer 1

The recursive method recur executes itself from within

When the statement System.out.println(recur(32)); is executed, the string value "2101" is printed

How to determine the output of the statement?

The flow of the program is as follows:

The method keeps updating the string variable dig with the remainder of the val variable divided by 3When the remainder is less than or equal to 0, the method is exited

So, when 32 is divided by 3.

The remainders are 2, 1, 0 and 1

So, the output of the statement is "2101"

Read about java methods at:

https://brainly.com/question/19271625


Related Questions

Which of the following "friction" material settings is most likely to be used for an icy surface?
a
0
b
1
c
100
d
-1

Answers

The type of friction that is most likely to be used for an icy surface is a static friction.

What is friction?

It should be noted that friction simply means a force that exist between two surfaces that are sliding across each other.

In this case, the type of friction that is most likely to be used for an icy surface is a static friction. Here, a little friction is offered.

Learn more about friction on:

https://brainly.com/question/1424758

The math function ceil(x) returns the smallest integer that is greater than or equal to x. True False

Answers

Answer:

Hello the answer is True.

Hope this helps!✌

The math function ceil(x) returns the smallest integer that is greater than or equal to x. The statement is false.

what is integer ?

An integer which is a number consist of 0, positive numbers, and negative numbers, be noted that an integer can not be a fraction, a decimal or a per cent, for example 1, 3, 4, 8, 99, 108, -43, -556, etc

These are the group of counting numbers such as positive and negative, and zero, that can be written without a fractional component. All natural numbers are  integers which can start from 1 and end at infinity.

All whole numbers are  integers, starting from 0 and ending at infinity, it can be of two types such as Positive Numbers and Negative Integer

In the number system, there are various types of numbers under the integer category such as Whole numbers, Natural numbers, Odd and Even integers, Prime and composite numbers

For more details regarding integer, visit

https://brainly.com/question/28513507

#SPJ2

Which practice enables recovery of accidental deletions in data records?

Answers

Answer: Data backup

Explanation:

Explanation: Data backup is the practice of keeping files in case of any accidental deletions for restoration

45 points!!!!!
One of the options for a software engineer is to work with the testing team of an SDLC project. In your view, state the pros and cons of placing a junior engineer with the testing team. Analyze it from both the company’s and employee’s points of view.

Answers

The pros and cons of placing a junior engineer with the testing team is that:.

The pros is that they get to learn.The cons is that one has to go back and try to explain things step by step which may slow down the project process.

What are the pros and cons of a software engineer?

The pros of a person as a software engineer are the fact that they gett paid well, they are often respected, and they have the freedom to work from home,

The cons or disadvantages is that they often feels stressed, overwork themselves and others.

Learn more about SDLC project from

https://brainly.com/question/26872062

What happens if the accepted distance limitation of a 1000BASE-T Ethernet connection is ignored and frames are sent down a Cat5e cable segment of 300 meters

Answers

If the accepted distance limitation of a 1000BASE-T Ethernet connection is ignored and the frames are sent over a 300 meter Cat5e cable segment, the transmission speed will drop considerably.

What is UTP CAT5e cable?

Cat 5e utp cable models are manufactured for infrastructure applications; they provide the networks that use them with the ability to transfer data securely, without packet loss and without any loss of speed during operations.

What is the difference between the two cables?

Both specify Ethernet communication but 1000BASE-T at 1 Gb/s and both are designed to run on four-pair, 100 ohm impedance twisted-pair cables, up to 100 meters.

From these information, we can conclude that if the accepted distance limitation of a 1000BASE-T Ethernet connection is ignored and the frames are sent over a 300 meter Cat5e cable segment, the transmission speed will drop considerably.

Learn more about  1000BASE-T in brainly.com/question/10053170

The type of database that would be best to store and organize data with feature and measure attributes is which of the following?
a. object-oriented database.
b. multidimensional database.
c. relational database.
d. all of the above.

Answers

The type of database that would be best to store and organize data with feature and measure attributes is multidimensional database.

What is multidimensional database?

A multidimensional database (MDB) is known to be a type of database that is mandated with the role of optimizing for data warehouse and also for online analytical processing (OLAP) works.

Note that MDBs are mostly used by having them from input that is gotten from existing relational databases and as such, the type of database that would be best to store and organize data with feature and measure attributes is multidimensional database.

Learn more about database from

https://brainly.com/question/26096799

What two tabs does Outlook have that PowerPoint does not? View and Send/Receive Folder and Home Folder and Home Send/Receive and Folder

Answers

What are the ribbon tabs in Microsoft Outlook?

The main Outlook menu has a ribbon tab with default commands. File, Home, Send/Receive, Folder, and View are commands on the main ribbon tab. The Backstage view is where you can see information and options pertaining to the user account and settings.

Answer: view and send/recieve

Explanation:

100 points.
Don't answer unless you know.

Answers

Answer:

On windows 10,

Open the Start menu.

Type “restore files” and hit Enter on your keyboard.

Look for the folder where you deleted files were stored.

Select the “Restore” button in the middle to undelete Windows 10 files to their original location.

Mac:

Option 1: Use Undo Command on Mac

Option 2: Recover Files from Trash on Mac

Option 3: Recover Deleted Files Using Terminal

Option 4: Recover Files from Backups

Option 5: Try Mac Data Recovery Software

Option 6: Use App-Specific Recovery Features

Option 7: Apply to data recovery services

Explanation:

what does computer graphics mean?​

Answers

Answer:

Computer graphics deals with generating images with the aid of computers

Explanation:

There is a new product launched and its customer ratings are being recorded in an array. the ratings are being monitored and analyzed if there is any decrease in the ratings. find the number of periods in which the rating is consecutively decreasing.

example - ratings = [4,3,5,4,3]
periods (in other words sub arrays in which ratings are decreasing):
one day periods = [4],[3],[5],[4],[3] (count of subarrays is 5)
two day periods = [4,3],[5,4],[4,3] (count of subarrays is 3)
3 day periods = [5,4,3] (count of subarrays is 1)
so, the output for this example will be 9 (5 + 3 + 1)

Answers

The program to find the number of periods in which the rating is consecutively decreasing is; As written in the attached file

What is the program array?

What we are required to do to find the number of elements in decreasing part. For example;

4,3 means One decreasing part and has 2 elements

5, 4, 3 means second decresing part and has 3 element.

Thereafter, we just add n*(n + 1)/2 to result.

where;

n = number of elements in any part

n*(n + 1) /2 is number of decreasing subarray that can be made

For the second decreasing part which is [5, 4, 3];

number of sub arrays you can make = 3 * 4/2 = 6

Thus, we have;

[5], [4,], [3], [5,4],[4,3],[5,4,3]

The program to find the number of periods in which the rating is consecutively decreasing is as follows in the attached file;

Read more about program array at; https://brainly.com/question/16266708

What's better, adventure time or regular show?

Answers

i would have to say regular show

Explain why Austin takes close-up pictures of whales and displays them in life-size? worth 50 points

Answers

The reason why Austin takes close - up pictures of and displays them in life - size is due to the fact that  he wants to give viewers an indelible view or opinion of what a whale is.

It also to give whales a background to bring out unexplored thought and emotion in a lot of ways that has been yet to pursued .

What are Whales?

This is known to be Animals that are said to be mostly distributed and have a lot of group of aquatic placental marine mammals.

They are known to belong to an informal grouping as they belong to the order Cetartiodactyla.

Learn more about pictures from

https://brainly.com/question/25938417

Write an assembly program to find the largest item in an array and store it in a variable named MAXIMUM. Hint: Use both Jump and loop instructions to write the program. Logic: Assume that the first item of the array is the minimum and store it in variable MAXIMUM Write a loop. Inside the loop, compare the each array item with the minimum If the array item is less than the MAXIMUM, update MAXIMUM with that array item. . Data Array WORD 10, 2, 23, 45, 21, 11 MAXIMUM WORD

Answers

Use the knowledge of computational language in C++ to write the a code assembly program to find the largest item.

How to write a maximum function in C++?

To make it simpler the code is described as:

#include<bitd/stdc++.h>

Using namespace std;

Int main(){

Int arr[10]={10, 2, 23, 45, 21, 11};

Int min=INT_MAX;

Int max=INT_MIN;

for(int i=0;i<10;i++)

If(min<arr[i])min=arr[i];

for(int j=0;j<10;j++)

if(max>arr[j])max=arr[j];

Cout<<max<<” “<<min<<endl;

return 0;

See more about C++ code at brainly.com/question/19705654

In this problem. we consider the delay introduced by the tcp slow-start phase. consider a client and a web server directly connected by one link of rate r. suppose the client wants to retrieve an object whose size is exactly equal to 15 s, where s is the maximum segment size (mss). denote the round-trip time between client and server as rtt (assumed to be constant). ignoring protocol headers. determine the time to retrieve the object (including tcp connection establishment) when
a. 4 sir> sir + rtt > 2sir
b. sir + rtt> 4 sir
c. sir> rtt.

Answers

The time that is required to retrieve the object (including TCP connection establishment) when [tex]4S/R > S/R > RTT > 2S/R[/tex] is equal to [tex]\frac{14S}{R}+4RTT[/tex]

How to calculate the time needed to receive all objects.

In this scenario, we would denote the round-trip time that exist between the web server and the client with [tex]RTT[/tex] and assume that it is constant.

The time that is required to retrieve the object when [tex]4S/R > S/R > RTT > 2S/R[/tex] would be calculated by adding the round trip of sender and reciever together as follows:

Round trip = RTT + RTT

Next, we would determine the delay in packet transmission:

Note: [tex]\frac{8S}{R}+\frac{4S}{R}=\frac{12S}{R}[/tex]

[tex]Time = (\frac{S}{R} +RTT)+(\frac{S}{R} +RTT)+(\frac{12S}{R}) +RTT+RTT\\\\Time = \frac{14S}{R}+4RTT[/tex]

When [tex]S/R +RTT > 4S/R[/tex], we have:

The time that is required to retrieve the object would be calculated by adding the round trip of sender and reciever together as follows:

[tex]Time = (\frac{S}{R} +RTT)+(\frac{S}{R} +RTT)+(\frac{8S}{R}) +RTT+RTT\\\\Time = \frac{11S}{R}+5RTT[/tex]

The time that is required to retrieve the object when [tex]S/R > RTT[/tex] would be calculated by adding the round trip of sender and reciever together as follows:

[tex]Time = (\frac{S}{R} +RTT)+(\frac{14S}{R}) +RTT\\\\Time = \frac{15S}{R}+3RTT[/tex]

Read more on round trip here: https://brainly.com/question/6884622

what are the two methods of creating a folder​

Answers

Answer:

1. right click empty space, go to New, and click New Folder

2. press Ctrl + Shift + N

Explanation:

In best practice, should you use all lowercase, all uppercase or a mixture of cases in HTML tag names?

a
All lowercase

b
The first letter should be uppercase, the rest lowercase.

c
A mixture is fine.

d
All uppercase

Answers

B considering it’s proper english, we went through this about a week ago

A ________ is a small, lightweight, power-conserving, computing device that is capable of wireless connectivity.

Answers

Answer:

A mobile device is a small, lightweight, power-conserving, computing device that is capable of wireless connectivity.

Explanation:

I guess say this considering a phone,watch,etc. all are small and mobile devices.

If you were designing facial recognition software based on machine learning,
how would you avoid algorithmic bias?
O A. Make sure to avoid using any algorithms in the program
O B. Ask the programmers if they are biased against groups of people
O C. Use training images that show a diverse group of people
D. Use photos with people facing in all different directions

Answers

To avoid algorithmic bias, Ask the programmers if they are biased against groups of people.

How do you avoid an algorithm bias?

The right step is to avoid this kind of bias is to take a record of inventory of the algorithms. Note that Developers can communicate with stakeholders to know more about about how and when algorithms are being applied.

Once you have known the algorithms, then you can appoint a person to monitor the algorithms, mostly among wide groups.

Learn more about algorithm  from

https://brainly.com/question/24953880

When would a flag variable be most useful?
1.when printing the number of items in a list

2.when checking the condition of a variable in a while loop

3.inside a function that prints the largest side of a triangle

4.when initializing a list

Answers

2. When checking the condition of a variable in a while loop.

What makes an operating system the master controller

Answers

Answer:

An operating system is a master control program, which controls the functions of the computer system as a whole and the running of application programs. All computers do not use the same operating systems.

Explanation:

If a driver update creates a problem, you can __________________ the driver update if the previous drivers were working.

Answers

Answer:

rollback the driver update if the previous drivers were working

Does single quote and double quote work same in javascript

Answers

Answer:

yes!

Explanation:

the only difference is that some companies prefer one over the other as a standard

https://stackoverflow.com/questions/242813/when-should-i-use-double-or-single-quotes-in-javascript

but they work the same

What does it mean when someone silences notifications?.

Answers

Answer:

Silencing notifications does not alert someone when the notification comes in. It is silent. These settings were invented to help avoid distractions. The notifications still come in just quietly without an alert and can be checked at any time. Lots of people silence notifcations at night, while sleeping, while studying, etc.

Explanation:

P.W. Singer jokes about how many people are using Wang computers. What point is he making with this joke?

Answers

P.W Singer stated:

"And think about it this way: We don't use Wang computers anymore, or Commodore 64s, kids don't play Atari videogames. Those companies may have been at the forefront of the digital revolution, they're not anymore. Same thing in war. You know the British invent the tank. The Germans figure out how to use the tank better,"

Enjoy

Please have a great day <3

The traditional ROM-BIOS has been replaced with __________. ELAM Boot Secure Boot Unified Extensible Firmware Interface (UEFI) Trusted Machine Platform

Answers

The traditional ROM-BIOS has been replaced with Unified Extensible Firmware Interface (UEFI).

Why the use of traditional BIOS?

This type of BIOS is one that is known to have drive support that is saved in its ROM, which makes updating BIOS firmware a little hard .

The use of a BIOS is known to be a kind of firmware that often gives  one runtime services mainly for operating systems and programs.

Learn more about ROM from

https://brainly.com/question/24688176

trying to make the baseplate red and turn off can collide then the game waits 5 seconds and turns on can collide, making the baseplate green aswell.
would this script work?

local myBasePlate = game.Workspace.Baseplate

local function makeBasePlateRed()
myBasePlate.CanCollide = false
myBasePlate.BrickColor = BrickColor.Red()
end

makeBasePlateRed()

wait(5)
local function makeBasePlateGreen()
myBasePlate.CanCollide = true
myBasePlate.BrickCOlor = BrickColor.Green()

Answers

Answer:

Explanation:

yes

but dont forget to call makeBasePlateGreen

maybe you would call it at the end of the program?

by the way you have a typo at the end

make the O lowercase

myBlasePlate.BrickColor = BrickColor.Green()

and then add this to the end

makeBasePlateGreen()

so you call the function and actually use it.

How could the following line of code be shortened?

average = average + 1

Group of answer choices:

1.average + a

2.average += 1

3.average = + 1

4.average = 1 + average

Answers

Answer:

2

Explanation:

The second option is the only one that will work. The last would work but doesn't make the code any shorter.

Source lines of code (SLOC), also referred to as lines of code (LOC), is a software metric that counts the lines in the source code of a computer program to determine the size of the program. Thus, option B is correct.

What role of line of code if shortened?

It might be argued that writing code in fewer lines rather than several lines is more effective. There are more places for bugs to hide, and it may be more difficult to find them if you have more lines of code.

By enclosing expressions in parentheses, long lines can be split into many lines. These should be used instead of a backslash to continue a line. Ensure that the continuation line is properly indented.

Instead of breaking before a binary operator, it is preferable to break after the operator.The same results can be achieved with fewer lines of code (and perhaps even better) than with many lines of code.

Therefore, The second option is the only one that will work.

Learn more about line of code here:

https://brainly.com/question/18844544

#SPJ2

Please help me!!!!!!!!!!! I really need help

Answers

The answer is a variable

A noncompete agreement is used to _____. Select 3 options.
ensure that legal information can be disclosed in the company at any time via email


ensure that if dismissed, an employee cannot compete with the employer

ensure that if dismissed, the employee can compete at any time with the employer

ensure ethical behavior when an employee is employed or dismissed

ensure that when someone is employed, they will not compete with their employer

Answers

A noncompete agreement is used to:

Ensure that if dismissed, an employee cannot compete with the employer.Ensure that if dismissed, the employee can compete at any time with the employer.Ensure ethical behavior when an employee is employed or dismissed.

What is Non-compete agreement?

A  non-compete clause is one that has a restrictive covenant. It is a type of clause under which one of the party is said to agrees not to enter into or start a similar trade.

In this type of noncompete agreements, the employer often control its former employees' work or actions long after they leave the firm.

Learn more about A noncompete agreement from

https://brainly.com/question/20800769

Answer: Below

Explanation: don´t worry the one in yellow is right

How do IT Support professionals measure success? Choose all answers that apply. You will get credit for all answers that are correct. Select 4 correct answer(s)
Using the SWOT analysis
Creating a C-Corporation
Customer satisfaction
Saving money in the bank
Call volume
Resolution time
Response time​

Answers

IT Support professionals measure success through;

Using the SWOT analysis.Customer satisfaction.Resolution time.Response time​.

How do One measure success in information technology?

IT success is known to be one that can be achieved by excelling in a lot of aspects such as:

Operational excellence.Delivering new functionality. keeping costs in line, etc.

By using the four method above, one can know if IT is succeeding or not.

Learn more about success from

https://brainly.com/question/24553900

Other Questions
A perfectly competitive firm has fixed costs of $1 million a month, variable costs of $2 million a month and product sales of $3 million a month. what statement is a correct analysis of the situation 8-1 skills practice multiplying and dividing rational expressions Five widgets and three gadgets cost $109. 90. One widget and four gadgets cost $75. 70. How much does one gadget cost? how does a child become socialized by the family? *HELP ASAP I WILL GIVE U BRAINLEAST* (20 POINTS)You have inherited $8000 from your grandfather. Knowing that you will soon be going to college you decide to invest your money into an account that has an 8% interest rate that is compounded quarterly. How much money will you have in your account after 5 years?a) Exponential growth or decay:b) Identify the initial amount:c) Identify the growth/decay factor:d) Write an exponential function to model the situation:e) Do the problem: how do you find the square root for 9cm Summary of the ghost by Walter de la mare Can somebody please help me with this? Thank youuuu This figure represents a compartment in a container for storing sewing supplies. Another compartment is identical except that it is 3 centimeters taller.What is the difference in volume of the two compartments?Enter your answer in the box. cmRight trapezoidal prism. The height of the trapezoid base is labeled 7 cm. The larger base is labeled 15 cm and the shorter base is labeled 5 cm. The two legs of the trapezoid are labeled 10 cm. The height of the prism is labeled 8 cm. cmhelp please Suggest the pH of the solution made when potassium oxide dissolves in water. A student watches the tide change, and sees water waves pass the end of the dockthat follow the pattern shown below:13)The student counts the waves with a stopwatch, and determines that it takes 8.75seconds for a single wave to go by. The wave frequency is ---- Which of the following is a run-on sentence?o We were not sure what we wanted to do, so we decided to see a movie.o My friend and I'went on a bike ride.o I wanted to go to the movie he wanted to stay home.o Although I felt like going on a walk, I was too tired and stayed home instead. The sum of two integers is 72 and their difference is 8. Find the integers Hello people ~Ignition temperature is the lowest temperature at which a substance catches fire. Identify the correct option regarding the ignition temperature of a good fuel.A. Ignition temperature below room temperatureB. Ignition temperature above room temperatureC. Ignition temperature equal to 100CD. Ignition temperature equal to room temperature What is the area of this trapezoid? Given the figure below , find the blues of x and z Dehydration can lead to ____________ blood osmolarity. What is the slope of the line y = 4 , equals, minus, 4? Choose 1 answer: Of all the roles of the president, what role should be his top priority and why? Michael has a bag with 2 red marbles, 4 white marbles and 3 purple marbles. He will randomly select 2 marbles from the bag one at a time withoutreplacement. What is the probability that he will choose a red marble first and then a white marble?O 13/188/81O 1/9O 2/3