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
saul85 [17]
3 years ago
6

Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty

string String temp; for (int i = 0; i < s.length(); i++) { temp = s.substring(i, i + 1); if (!(temp.equals(BLANK))) str += temp;
}
return str;
}
Which of the following is themost precise description ofwhat doSomething does?
A. It returns a String that contains s.length() blanks.
B. It returns s with all its blanks removed.
C. It returns s unchanged.
D. It returns a String that is equivalent to s with all its blanks removed.
E. It returns a String that is an exact copy of s.

Computers and Technology
1 answer:
storchak [24]3 years ago
3 0

Answer:

D. It returns a String that is equivalent to s with all its blanks removed

Explanation:

You might be interested in
Write a calculator program that will allow only addition, subtraction, multiplication &amp; division. Have the
sveta [45]

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

operation = input("Which operation are you performing? (a/s/m/d) ")

if operation == "a":

   print("{} + {} = {}".format(num1, num2, num1+num2))

elif operation == "s":

   print("{} - {} = {}".format(num1, num2, num1-num2))

elif operation == "m":

   print("{} * {} = {}".format(num1, num2, num1*num2))

elif operation == "d":

   print("{} / {} = {}".format(num1, num2, num1/num2))

I hope this helps!

5 0
2 years ago
Create a program to deteate a program to determine whether a user-specified altitude [meters] is in the troposphere, lower strat
nordsb [41]

Answer:

#include <iostream>

using namespace std;

int main()

{

   float altitude;

   cout<<"Enter alttitude in meter";

cin >>altitude;

if(altitude<0 || altitude > 50000)

{

   cout<<"Invalid value entered";

   return 0;

}

else{

   if(altitude<= 10000)

   {cout <<"In troposphere "<<endl;}

   

   else if(altitude>10000 && altitude<=30000)

   {cout <<"In lower stratosphere"<<endl;}

   

   else if(altitude>30000 && altitude<=50000)

   {cout <<"In upper stratosphere"<<endl;}

   

}

   return 0;

}

Explanation:

Define a float type variable. Ask user to enter altitude in meters. Store value to altitude variable.

Now check if value entered is positive and less than 5000,if its not in the range of 0-50,000 display a termination message and exit else check if it's in less than 10000, in between 10000 and 30000 or in between 30000 and 50000.

10,000 is above sea level is troposphere.

10,000-30,000 is lower stratosphere.

30,000-50,000 is upper stratosphere.

3 0
3 years ago
Choose the word that best completes this sentence. You should post safe load _________ for each floor and keep aisles and passag
erica [24]
You should post safe load limits for
3 0
2 years ago
Read 2 more answers
How do you activate a sim card in an HP probook 6470b and what drivers are needed​
UNO [17]

[YOU NEED A SIM CARD TRAY, IF A DRIVER IS NEEDED IT WILL TELL YOU AND JUST LET YOU INSTALL IT]

-Ensure the device is powered off.

-From the left edge of the device, remove the card tray. ...

-With the gold contacts facing down and the notch located in the lower-right, insert the SIM card into the tray as shown. ...

-Insert the card tray.

8 0
2 years ago
How would a password be a good password, how, and why.
Pachacha [2.7K]

Answer:

Complicated

Explanation:

A good password is something that can't just be guessed like cupcake it has to be like CUp_c3k3_456

4 0
2 years ago
Read 2 more answers
Other questions:
  • What kinds of online behaviors could be considered cyberbullying?
    7·2 answers
  • a.Write a Python function sum_1k(M) that returns the sumí‘ í‘ = ∑1푘푘푀푀푘푘=1b.Compute s for M = 3 by hand and write
    15·1 answer
  • According to the ethical computer use policy, users should be __________ of the rules and, by agreeing to use the system on that
    11·1 answer
  • Which type of password would be considered secure
    13·2 answers
  • ____ is the only automated disk-to-disk tool that allows you to copy data to a slightly smaller target drive than the original s
    5·1 answer
  • In determining where to store specific data in a(n) centralized DBMS, factors such as communications cost, response time, storag
    12·1 answer
  • failure of the _ cylinder will often result in sudden unexpected loss of the ability to stop the vehicle
    10·1 answer
  • What is the meaning of <br>computer<br>viruses ?​
    8·1 answer
  • List four tasks that humans perform frequently, but which may be difficult for a computerized agent to accomplish. Describe the
    9·1 answer
  • For quantitative data (e.g. the number of milligrams of a drug) coding your data involves?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!